stage 4 package updates
[hdw-linux/hdw-linux.git] / packages / net / nfs-utils / nfs-utils
1 # hdw-linux nfs-utils extensions
2
3 # author: hackbard
4
5 # [S] 3-3
6 # [V] 1.0.7
7 # [D] nfs-utils-1.0.7.tar.gz ftp://ftp.kernel.org/pub/linux/utils/nfs/
8
9 confopt="$confopt --disable-gss"
10
11 post_install()  {       
12         # init scripts
13         cat > $root/etc/init.d/nfsd << 'EOF'
14 #!/bin/sh
15 #
16 # hdw - linux /etc/init.d/nfsd
17 #
18
19 # remove for automatic startup
20 exit 0
21
22 [ ! -f /usr/sbin/portmap ] && exit 0
23
24 case "$1" in
25         start)  echo "starting nfsd."
26                 insmod -q nfsd > /dev/null 2>&1
27                 rpc.rquotad
28                 rpc.mountd
29                 rpc.nfsd 8
30                 exportfs -a ;;
31         stop)   echo "stopping knfsd."
32                 killall -15 rpc.mountd
33                 killall -15 rpc.nfsd
34                 killall -15 rpc.rquotad
35                 killall -9 nfsd
36                 exportfs -u -a ;;
37         *)      echo "usage: $0 [start|stop]"
38                 exit 0 ;;
39 esac
40 exit 0
41 EOF
42         # permissions & link
43         chmod 750 $root/etc/init.d/nfsd
44         ln -sf ../nfsd $root/etc/init.d/rc2.d/S50nfsd
45         ln -sf ../nfsd $root/etc/init.d/rc2.d/K50nfsd
46         }