diff --git a/scripts/debian/falco b/scripts/debian/falco index f173166e..2312603b 100755 --- a/scripts/debian/falco +++ b/scripts/debian/falco @@ -62,11 +62,11 @@ do_start() # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started + if [ ! -d /sys/module/falco ]; then + /sbin/modprobe falco || exit 2 + fi start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ || return 1 - if [ ! -d /sys/module/falco ]; then - /sbin/modprobe falco || exit 1 - fi start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_ARGS \ || return 2 diff --git a/scripts/rpm/falco b/scripts/rpm/falco index 05bbc5fe..5453ece7 100755 --- a/scripts/rpm/falco +++ b/scripts/rpm/falco @@ -52,10 +52,10 @@ start() { [ -x $exec ] || exit 5 # [ -f $config ] || exit 6 echo -n $"Starting $prog: " - daemon $exec --daemon --pidfile=$pidfile if [ ! -d /sys/module/falco ]; then /sbin/modprobe falco || return $? fi + daemon $exec --daemon --pidfile=$pidfile retval=$? echo [ $retval -eq 0 ] && touch $lockfile