diff options
author | ed <ed@FreeBSD.org> | 2008-10-25 18:45:40 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2008-10-25 18:45:40 +0000 |
commit | 4405dea5ac482964b7b2ab3f85c27e0ebc91216f (patch) | |
tree | c29f452b46419d4972cb97c267a6541e4d90b655 /etc/periodic | |
parent | 8fb9b724ff720705e8eeeedd65f997aa95f53cdb (diff) | |
download | FreeBSD-src-4405dea5ac482964b7b2ab3f85c27e0ebc91216f.zip FreeBSD-src-4405dea5ac482964b7b2ab3f85c27e0ebc91216f.tar.gz |
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.
Diffstat (limited to 'etc/periodic')
-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 3b72c52..2558d0e 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;; |