Date: Fri, 29 Jun 2012 17:28:03 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r237808 - in stable/8/etc/periodic: daily security Message-ID: <201206291728.q5THS3Vl059366@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Jun 29 17:28:03 2012 New Revision: 237808 URL: http://svn.freebsd.org/changeset/base/237808 Log: MFC 197552: Silence warning printed by getfsspec(3) when /etc/fstab does not exist fstab: /etc/fstab:0: No such file or directory and from dump(8) when setfsent(3) fails due to /etc/fstab not existing: DUMP: Can't open /etc/fstab for dump table information: No such... This makes daily and security periodic runs somewhat cleaner in jails which lack /etc/fstab files. Modified: stable/8/etc/periodic/daily/400.status-disks stable/8/etc/periodic/security/200.chkmounts Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/periodic/daily/400.status-disks ============================================================================== --- stable/8/etc/periodic/daily/400.status-disks Fri Jun 29 17:26:37 2012 (r237807) +++ stable/8/etc/periodic/daily/400.status-disks Fri Jun 29 17:28:03 2012 (r237808) @@ -19,6 +19,9 @@ case "$daily_status_disks_enable" in df $daily_status_disks_df_flags && rc=1 || rc=3 # display which filesystems need backing up + if ! [ -f /etc/fstab ]; then + export PATH_FSTAB=/dev/null + fi echo "" dump W || rc=3;; Modified: stable/8/etc/periodic/security/200.chkmounts ============================================================================== --- stable/8/etc/periodic/security/200.chkmounts Fri Jun 29 17:26:37 2012 (r237807) +++ stable/8/etc/periodic/security/200.chkmounts Fri Jun 29 17:28:03 2012 (r237808) @@ -50,6 +50,9 @@ case "$daily_status_security_chkmounts_e ignore="${ignore}|^amd:" esac [ -n "$ignore" ] && cmd="egrep -v ${ignore#|}" || cmd=cat + if ! [ -f /etc/fstab ]; then + export PATH_FSTAB=/dev/null + fi mount -p | sort | ${cmd} | check_diff mount - "${host} changes in mounted filesystems:" rc=$?;;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206291728.q5THS3Vl059366>