diff options
author | Ed Schouten <ed@FreeBSD.org> | 2008-10-25 18:45:40 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2008-10-25 18:45:40 +0000 |
commit | 53cb00a92b03f855a072d3f85f7b4e6081523b49 (patch) | |
tree | c29f452b46419d4972cb97c267a6541e4d90b655 /etc/periodic/security | |
parent | 38a2db2eb00626b9c868c2fd6d6510860a0f20c7 (diff) | |
download | src-53cb00a92b03f855a072d3f85f7b4e6081523b49.tar.gz src-53cb00a92b03f855a072d3f85f7b4e6081523b49.zip |
Sort `mount -p' output by name before checking for any differences.
I noticed on a system at home that restarting named(8) causes the
/var/named/dev mount to be moved to the bottom of the mount list,
because it gets remounted. When I received the daily security email this
morning, I was quite amazed to see that the security report listed the
differences, while it was nothing out of the ordinary.
If we just throw the `mount -p' output through sort(1), we'll only
receive notifications about changes to mounts if something has really
changed.
Notes
Notes:
svn path=/head/; revision=184265
Diffstat (limited to 'etc/periodic/security')
-rwxr-xr-x | etc/periodic/security/200.chkmounts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/periodic/security/200.chkmounts b/etc/periodic/security/200.chkmounts index 3b72c5282b5a..2558d0e01ff6 100755 --- a/etc/periodic/security/200.chkmounts +++ b/etc/periodic/security/200.chkmounts @@ -50,7 +50,7 @@ case "$daily_status_security_chkmounts_enable" in ignore="${ignore}|^amd:" esac [ -n "$ignore" ] && cmd="egrep -v ${ignore#|}" || cmd=cat - mount -p | ${cmd} | + mount -p | sort | ${cmd} | check_diff mount - "${host} changes in mounted filesystems:" rc=$?;; *) rc=0;; |