From 4405dea5ac482964b7b2ab3f85c27e0ebc91216f Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 25 Oct 2008 18:45:40 +0000 Subject: 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. --- etc/periodic/security/200.chkmounts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;; -- cgit v1.1