Package: xsupplicant
Version: 1.0.1-4
Severity: normal
Tags: patch
Hi.
I'm posting this as a normal bug instead of wishlist since LSB compliance
has been named as a pet release goal at least. The init script aliases
"force-reload" to "restart", which unconditionally restarts the service,
starting it if it wasn't already running. According to LSB, this is wrong.
Instead, it should be an alias to "try-restart" if reloading config is not
available, where try-restart only restarts a service if it is already
running. I therefor propose to apply the attached patch to fix this issue.
Regards,
Sven
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (90, 'testing'), (50, 'unstable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-12-amd64-generic
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages xsupplicant depends on:
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libssl0.9.7 0.9.7e-3sarge1 SSL shared libraries
-- no debconf information
--- debian/xsupplicant.init.orig 2006-07-10 18:30:09.984436989 +0200
+++ debian/xsupplicant.init 2006-07-10 18:41:30.542344272 +0200
@@ -83,7 +83,16 @@
echo "$NAME."
fi
;;
- restart|force-reload)
+ try-restart|force-reload)
+ if stillrunning; then
+ exec $0 restart
+ fi
+ ;;
+ reload)
+ echo "Reload not supported for $DESC. Try 'force-reload' instead."
+ exit 3
+ ;;
+ restart)
echo -n "Restarting $DESC: "
start-stop-daemon -o --stop --quiet --retry 5 --pidfile $PIDFILE \
--exec $DAEMON
@@ -101,7 +110,7 @@
;;
*)
N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
+ echo "Usage: $N {start|stop|status|restart|try-restart|force-reload}"
>&2
exit 1
;;
esac