mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-27 11:55:06 +00:00
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. MFC after: 1 month
This commit is contained in:
parent
7365f12882
commit
ca82268b2a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=197552
@ -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;;
|
||||
|
@ -50,6 +50,9 @@ case "$daily_status_security_chkmounts_enable" in
|
||||
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=$?;;
|
||||
|
Loading…
Reference in New Issue
Block a user