Results 1 to 4 of 4
Can you please have a look at this for me? When I run it I get exit 0 not found
I am a newbie to linux, its a script provided ...
- 02-06-2010 #1Just Joined!
- Join Date
- Feb 2010
- Posts
- 6
nfs startup script
Can you please have a look at this for me? When I run it I get exit 0 not found
I am a newbie to linux, its a script provided by a website, but I guess with an error?
#!/bin/sh
#
# Start NFS
#
start() {
echo "Starting NFS"
/sbin/modprobe nfsd
sleep 2
start-stop-daemon --start --exec /sbin/portmap
start-stop-daemon --start --exec /usr/sbin/rpc.mountd
start-stop-daemon --start --exec /usr/sbin/rpc.nfsd
start-stop-daemon --start --exec /usr/sbin/rpc.statd
start-stop-daemon --start --exec /usr/sbin/rpc.lockd
start-stop-daemon --start --exec /usr/sbin/rpc.rquotad
/usr/sbin/exportfs -a # explicit exportfs is required!
}
stop() {
echo "Stopping NFS"
start-stop-daemon --stop --exec /usr/sbin/rpc.rquotad
start-stop-daemon --stop --exec /usr/sbin/rpc.lockd
start-stop-daemon --stop --exec /usr/sbin/rpc.statd
start-stop-daemon --stop --exec /usr/sbin/rpc.nfsd
start-stop-daemon --stop --exec /usr/sbin/rpc.mountd
start-stop-daemon --stop --exec /sbin/portmap
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
cleanup)
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
- 02-06-2010 #2
your distro should already have an init script for nfs, what distro are you using?
- 02-06-2010 #3Just Joined!
- Join Date
- Feb 2010
- Posts
- 6
A western digital my book world edition

Linux version 2.6.17.14 (clarke@mccoy.oxsemi.com.asic.oxsemi.com) (gcc version 4.1.0) #1 PREEMPT Mon Mar 26 12:36:33 BST 2007
- 02-06-2010 #4Just Joined!
- Join Date
- Mar 2006
- Posts
- 29
remove the last $? after the last exit


Reply With Quote
