#!/bin/sh # # unfs3 This shell script takes care of starting and stopping # the UNFS service. # # chkconfig: 345 60 20 # description: NFS is a popular protocol for file sharing across TCP/IP \ # networks. This service provides NFS server functionality, \ # which is configured via the /etc/exports file. # probe: true # config: /etc/sysconfig/unfs3 # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. if [ ! -f /etc/sysconfig/network ]; then exit 0 fi . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -x /usr/sbin/unfsd ] || exit 0 # Don't fail if /etc/exports doesn't exist; create a bare-bones version # and continue. [ -s /etc/exports ] || \ { echo "#" > /etc/exports && chmod u+rw,g+r,o+r /etc/exports ; } || \ { echo "/etc/exports does not exist" ; exit 0 ; } # Check for and source configuration file otherwise set defaults # TUNE_QUEUE: controls whether to up the size of input queues [ -f /etc/sysconfig/unfs3 ] && . /etc/sysconfig/unfs3 # See how we were called. case "$1" in start) echo -n $"Starting UNFS daemon: " daemon unfsd echo touch /var/lock/subsys/unfs3 ;; stop) echo -n $"Stopping UNFS daemon: " killproc unfsd echo rm -f /var/lock/subsys/unfs3 ;; restart) $0 stop || : $0 start ;; reload) echo "Reload does the same thing as restart for the moment" $0 stop || : $0 start ;; status) echo "Not implemented yet" ;; *) echo $"Usage: $0 {start|stop|status|reload|restart}" exit 1 esac exit 0