#!/bin/sh # # devfsd Start/stop devfsd # # chkconfig: 12345 1 99 # # description: Starts/stops devfsd - daemon responsible for creating smart # links when using devfs # # $Id: devfsd,v # Source function library . /etc/rc.d/init.d/functions # Read system config data [ -r /etc/sysconfig/system ] || exit 1 . /etc/sysconfig/system is_yes "$RUN_DEVFSD" || exit 1 # See how we were called. case "$1" in start) # Check if the service is already running? if [ ! -f /var/lock/subsys/devfsd ]; then msg_starting devfsd daemon devfsd /dev RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/devfsd else msg_already_running devfsd exit 1 fi ;; stop) if [ -f /var/lock/subsys/devfsd ]; then msg_stopping devfsd killproc devfsd RETVAL=$? rm -f /var/lock/subsys/devfsd else msg_not_running devfsd exit 1 fi ;; restart) $0 stop $0 start ;; reload) if [ -f /var/lock/subsys/ ]; then msg_reloading devfsd killproc devfsd -HUP RETVAL=$? else msg_not_running devfsd RETVAL=1 fi ;; force-reload) # if program allows reloading without stopping $0 reload # or if it doesn't $0 stop && $0 start ;; status) status devfsd RETVAL=$? ;; *) # show "Usage: %s {start|stop|status|restart|reload|force-reload}" $0 msg_usage "$0 {start|stop|status|restart|reload|force-reload}" exit 1 esac exit $RETVAL # This must be last line ! # vi:syntax=sh:tw=78:ts=8:sw=4