--- isc-dhcp-server.regex 2015-04-20 10:10:33.856338827 +0200 +++ isc-dhcp-server 2015-04-20 10:03:05.513855201 +0200 @@ -31,6 +31,12 @@ . /lib/lsb/init-functions +check_for_upstart() { + if init_is_upstart; then + exit $1 + fi +} + # Read init script configuration [ -f "$DHCPD_DEFAULT" ] && . "$DHCPD_DEFAULT" @@ -72,6 +78,7 @@ case "$1" in start) + check_for_upstart 1 test_config log_daemon_msg "Starting $DESC" "$NAME" start-stop-daemon --start --quiet --pidfile "$DHCPD_PID" \ @@ -88,12 +95,14 @@ fi ;; stop) + check_for_upstart 0 log_daemon_msg "Stopping $DESC" "$NAME" start-stop-daemon --stop --quiet --pidfile "$DHCPD_PID" log_end_msg $? rm -f "$DHCPD_PID" ;; restart | force-reload) + check_for_upstart 1 test_config $0 stop sleep 2 @@ -103,6 +112,7 @@ fi ;; status) + check_for_upstart 1 echo -n "Status of $DESC: " check_status -v exit "$?"