Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > f03dcf88901fda23f88935a60a2fd973 > files > 1

unfs3-0.9.22-7.mga5.i586.rpm

#!/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
### BEGIN INIT INFO
# Provides: unfs3
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 4 5
# Short-Description: UNFS3 user-space NFSv3 server
# 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.
### END INIT INFO

# 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 ] || \
    { gprintf "#\n" > /etc/exports && chmod u+rw,g+r,o+r /etc/exports ; } || \
    { gprintf "/etc/exports does not exist\n" ; 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)
	gprintf "Starting UNFS daemon: "
	daemon unfsd
	echo

	touch /var/lock/subsys/unfs3
	;;
  stop)
	gprintf "Stopping UNFS daemon: "
	killproc unfsd
	echo

	rm -f /var/lock/subsys/unfs3
	;;
  restart)
	$0 stop || :
	$0 start 
	;;
  reload)
        gprintf "Reload does the same thing as restart for the moment\n"
	$0 stop || :
	$0 start 
	;;
  status)
	gprintf "Not implemented yet\n"
	;;
  *)
	gprintf "Usage: %s {start|stop|status|reload|restart}\n" "$0"
	exit 1
esac

exit 0