]> git.pld-linux.org Git - packages/nfs-utils.git/blame - nfs.init
drobiazg
[packages/nfs-utils.git] / nfs.init
CommitLineData
bf44c74c 1#!/bin/sh
083dbab7 2#
3# nfs This shell script takes care of starting and stopping
4# the NFS services. Later we might add NIS too.
5#
6# chkconfig: 345 60 20
7# description: NFS is a popular protocol for file sharing across TCP/IP \
8# networks. This service provides NFS server functionality, \
9# which is configured via the /etc/exports file.
10# probe: true
11
083dbab7 12# Source function library.
13. /etc/rc.d/init.d/functions
14
15# Source networking configuration.
16. /etc/sysconfig/network
17
18# Check that networking is up.
bf44c74c 19[ "${NETWORKING}" = "no" ] && exit 0
083dbab7 20
21[ -f /usr/sbin/rpc.nfsd ] || exit 0
22[ -f /usr/sbin/rpc.mountd ] || exit 0
23[ -f /etc/exports ] || exit 0
24
1e67e0ab 25# Get sysconfig
bf44c74c 26if [ -f /etc/sysconfig/nfs ]; then
27 . /etc/sysconfig/nfs
28fi
083dbab7 29# See how we were called.
30case "$1" in
31 start)
32 # Start daemons.
bf44c74c 33 show Starting rpc.mountd
34 daemon rpc.mountd
35 show Starting rpc.nfsd
36 daemon rpc.nfsd
083dbab7 37 touch /var/lock/subsys/nfs
38 ;;
39 stop)
40 # Stop daemons.
bf44c74c 41 show Shutting down rpc.mountd
42 killproc rpc.mountd
43 show Shutting down rpc.nfsd
44 killproc rpc.nfsd
083dbab7 45 rm -f /var/lock/subsys/nfs
46 ;;
47 status)
48 status rpc.mountd
49 status rpc.nfsd
50 ;;
51 restart)
52 $0 stop
53 $0 start
54 ;;
55 *)
56 echo "Usage: $0 {start|stop|status|restart}"
57 exit 1
58esac
59
60exit 0
61
This page took 0.034886 seconds and 4 git commands to generate.