From 6561120bae921f51e3845f13ac4de0425b6fd719 Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Sat, 27 Jun 2009 17:10:31 +0000 Subject: Properly handle promisc checks (#51903) --- cron-sh/promisc_check.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cron-sh/promisc_check.sh') diff --git a/cron-sh/promisc_check.sh b/cron-sh/promisc_check.sh index 53cc168..99036a4 100755 --- a/cron-sh/promisc_check.sh +++ b/cron-sh/promisc_check.sh @@ -21,18 +21,18 @@ if [[ -f /etc/security/msec/security.conf ]]; then . /etc/security/msec/security.conf else echo "/etc/security/msec/security.conf don't exist." - return 1 + exit 1 fi if tail /var/log/security.log | grep -q "promiscuous"; then # Dont flood with warning. - return 0 + exit 0 fi # Check if a network interface is in promiscuous mode... if [[ ${CHECK_PROMISC} == no ]]; then - return 0; + exit 0; fi for INTERFACE in `/sbin/ip link list | grep PROMISC | cut -f 2 -d ':';/usr/bin/promisc_check -q`; do -- cgit v1.2.1