[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#2274: /etc/init.d/diald broken



Package: diald
Version: 0.10-2

1) it calls /etc/init.d/functions.  This breaks its command line
   parsing.

2) it's handling of the run_diald variable is (TBPF) silly.  Arguably
   it shouldn't refer to it at all when handling `stop'; it certainly
   shouldn't handle it the opposite to how it handles `start', as then
   one can never stop it in situations in which one can start it.

   I can see no argument for keeping the run_diald variable, in fact.

May I suggest the following as a better alternative?

----------------------------------------
#!/bin/sh
#
# Start or stop diald daemon
#

test -x /usr/sbin/diald || exit 0

DEVICE=/dev/cua2

case "$1" in
  start)
    start-stop-daemon --start --verbose --exec /usr/sbin/diald -- "$DEVICE" -f /etc/diald.options
    ;;
  stop)
     start-stop-daemon --stop --verbose --exec /usr/sbin/diald
    ;;
  *)
    echo "Usage: /etc/init.d/diald {start|stop}"
    exit 1
esac

exit 0
----------------------------------------


ttfn/rjk


Reply to: