initial checkin of new hdw-linux development cvs repository
[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-2
6 # [V] 1.0.6
7 # [D] nfs-utils-1.0.6.tar.gz http://belnet.dl.sourceforge.net/sourceforge/nfs/
8
9
10 post_install()  {       
11         # init scripts
12         cat > $root/etc/init.d/nfsd << 'EOF'
13 #!/bin/sh
14 #
15 # hdw - linux /etc/init.d/nfsd
16 #
17
18 # remove for automatic startup
19 exit 0
20
21 [ ! -f /usr/sbin/portmap ] && exit 0
22
23 case "$1" in
24         start)  echo "starting nfsd."
25                 insmod -q nfsd > /dev/null 2>&1
26                 rpc.rquotad
27                 rpc.mountd
28                 rpc.nfsd 8
29                 exportfs -a ;;
30         stop)   echo "stopping knfsd."
31                 killall -15 rpc.mountd
32                 killall -15 rpc.nfsd
33                 killall -15 rpc.rquotad
34                 killall -9 nfsd
35                 exportfs -u -a ;;
36         *)      echo "usage: $0 [start|stop]"
37                 exit 0 ;;
38 esac
39 exit 0
40 EOF
41         # permissions & link
42         chmod 750 $root/etc/init.d/nfsd
43         ln -sf ../nfsd $root/etc/init.d/rc2.d/S50nfsd
44         ln -sf ../nfsd $root/etc/init.d/rc2.d/K50nfsd
45         }