diff --git a/.cvsignore b/.cvsignore index 734dce4..0e19561 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -setroubleshoot-2.0.2.tar.gz +setroubleshoot-2.0.3.tar.gz diff --git a/setroubleshoot.init b/setroubleshoot.init index 012e832..97bcde1 100755 --- a/setroubleshoot.init +++ b/setroubleshoot.init @@ -45,8 +45,6 @@ # reload and the try-restart actions are optional. # the init script. - - PATH=/sbin:/bin:/usr/bin:/usr/sbin # Source function library. @@ -55,6 +53,31 @@ PATH=/sbin:/bin:/usr/bin:/usr/sbin RETVAL=0 prog="setroubleshootd" +usage(){ + echo $"Usage: $0 {start|stop|status|restart|try-restart|condrestart|reload|force-reload|cleardb [test][verbose]}" +} + +command=$1 +shift + +[ $command ] || (usage; exit 3) + +# look for extra options +while [ $# -gt 0 ]; do + arg=$1 + case "$arg" in + test) + EXTRAOPTIONS="$EXTRAOPTIONS -c audit.text_protocol_socket_path=/tmp/audispd_events" + ;; + verbose) + EXTRAOPTIONS="$EXTRAOPTIONS -V" + ;; + *) + echo "unknown arg $arg" + esac + shift +done + rhstatus(){ status $prog RETVAL=$? @@ -62,7 +85,7 @@ rhstatus(){ } # Allow status as non-root and also if SELinux is disabled -if [ "$1" = status ]; then +if [ "$command" = status ]; then rhstatus RETVAL=$? exit $RETVAL @@ -134,9 +157,8 @@ cleardb(){ return $RETVAL } - # See how we were called. -case "$1" in +case "$command" in start) start RETVAL=$? @@ -166,7 +188,7 @@ case "$1" in RETVAL=$? ;; *) - echo $"Usage: $0 {start|stop|status|restart|try-restart|condrestart|reload|force-reload|cleardb}" + usage RETVAL=3 esac diff --git a/setroubleshoot.spec b/setroubleshoot.spec index 7517490..9efa98b 100644 --- a/setroubleshoot.spec +++ b/setroubleshoot.spec @@ -1,6 +1,6 @@ Summary: Helps troubleshoot SELinux problems Name: setroubleshoot -Version: 2.0.2 +Version: 2.0.3 Release: 1%{?dist} License: GPLv2+ Group: Applications/System diff --git a/sources b/sources index 292e469..8b6f07d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9ca6ef75d47fe8fbecfe7698a86430c7 setroubleshoot-2.0.2.tar.gz +e2c4d2214a395049230aad74e1558f45 setroubleshoot-2.0.3.tar.gz