[7df280d] | 1 | #!/bin/bash |
---|
[7125722] | 2 | # Begin $rc_base/init.d/nfs-client |
---|
| 3 | |
---|
| 4 | # Based on sysklogd script from LFS-3.1 and earlier. |
---|
| 5 | # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org |
---|
| 6 | |
---|
| 7 | #$LastChangedBy: bdubbs $ |
---|
| 8 | #$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $ |
---|
| 9 | |
---|
| 10 | . /etc/sysconfig/rc |
---|
| 11 | . $rc_functions |
---|
[ad1a0bc] | 12 | . /etc/sysconfig/nfs-client |
---|
[7125722] | 13 | |
---|
| 14 | case "$1" in |
---|
| 15 | start) |
---|
| 16 | boot_mesg "Starting NFS statd..." |
---|
| 17 | loadproc /usr/sbin/rpc.statd |
---|
[ad1a0bc] | 18 | |
---|
| 19 | if [ "$NFS4" = "yes" ]; then |
---|
[983ca58] | 20 | boot_mesg "Mounting rpc_pipefs virtual filesystem..." |
---|
| 21 | /bin/mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs 2>&1 > /dev/null |
---|
| 22 | evaluate_retval |
---|
| 23 | |
---|
[78b069e] | 24 | boot_mesg "Starting NFS gssd..." |
---|
[5ef5f90] | 25 | loadproc /usr/sbin/rpc.gssd |
---|
[ad1a0bc] | 26 | |
---|
[78b069e] | 27 | boot_mesg "Starting NFS idmapd..." |
---|
[ad1a0bc] | 28 | loadproc /usr/sbin/rpc.idmapd |
---|
| 29 | fi |
---|
| 30 | |
---|
[7125722] | 31 | ;; |
---|
| 32 | |
---|
| 33 | stop) |
---|
[983ca58] | 34 | if [ "$NFS4" = "yes" ]; then |
---|
| 35 | boot_mesg "Stopping NFS idmapd..." |
---|
| 36 | killproc /usr/sbin/rpc.idmapd |
---|
| 37 | |
---|
| 38 | boot_mesg "Stopping NFS gssd..." |
---|
| 39 | killproc /usr/sbin/rpc.gssd |
---|
[78b069e] | 40 | |
---|
[983ca58] | 41 | boot_mesg "Unmounting rpc_pipefs virtual filesystem..." |
---|
| 42 | /bin/umount /var/lib/nfs/rpc_pipefs 2>&1 > /dev/null |
---|
| 43 | evaluate_retval |
---|
| 44 | fi |
---|
[78b069e] | 45 | |
---|
[7125722] | 46 | boot_mesg "Stopping NFS statd..." |
---|
| 47 | killproc /usr/sbin/rpc.statd |
---|
| 48 | ;; |
---|
| 49 | |
---|
| 50 | restart) |
---|
| 51 | $0 stop |
---|
| 52 | sleep 1 |
---|
| 53 | $0 start |
---|
| 54 | ;; |
---|
| 55 | |
---|
| 56 | status) |
---|
| 57 | statusproc /usr/sbin/rpc.statd |
---|
[983ca58] | 58 | if [ "$NFS4" = "yes" ]; then |
---|
| 59 | statusproc /usr/sbin/rpc.gssd |
---|
| 60 | statusproc /usr/sbin/rpc.idmapd |
---|
| 61 | fi |
---|
[7125722] | 62 | ;; |
---|
| 63 | |
---|
| 64 | *) |
---|
| 65 | echo "Usage: $0 {start|stop|restart|status}" |
---|
| 66 | exit 1 |
---|
| 67 | ;; |
---|
| 68 | esac |
---|
| 69 | |
---|
| 70 | # End $rc_base/init.d/nfs-client |
---|