A slightly improved version which captures the case that the .fw file is
present but not executable

#!/bin/sh
#        Written by Philip Christian
#
### BEGIN INIT INFO
# Provides:          fwbuilder
# Required-Start:    mountkernfs $local_fs networking hostname
# Required-Stop:     $local_fs
# Default-Start:     S
# Default-Stop:
# Short-Description: Set up fwbuilder
### END INIT INFO

case "$1" in
start)
    if [ -x /etc/"$(hostname)".fw ]; then /etc/"$(hostname)".fw
    else  if [ -f /etc/"$(hostname)".fw ]; then echo
/etc/"$(hostname)".fw not executable
          else echo /etc/"$(hostname)".fw not found
          fi
    fi
    ;;
stop|force-stop|restart|force-reload|status)
    ;;
*)
    echo "Usage: $0 {start|stop|force-stop|restart|force-reload|status}" >&2
    exit 1
    ;;
esac

exit 0



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to