This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
lsts_glued/rules/nfs-utils/fs/etc/rc.d/nfs-server
2015-02-08 20:02:35 +00:00

52 lines
977 B
Plaintext

start()
{
mkdir -p /var/lib/nfs
if ! [ -d /var/lib/nfs ]; then
echo "ERROR: failed to create data folder."
return 1
fi
/usr/bin/rpcbind
if [ $? -ne 0 ]; then
echo "ERROR: failed to start rpcbind."
return 1
fi
/usr/bin/rpc.statd
if [ $? -ne 0 ]; then
echo "ERROR: failed to start rpc.statd."
return 1
fi
/usr/bin/rpc.nfsd
if [ $? -ne 0 ]; then
echo "ERROR: failed to start rpc.nfsd."
return 1
fi
/usr/bin/exportfs -ra
if [ $? -ne 0 ]; then
echo "ERROR: failed to create filesystem table."
return 1
fi
/usr/bin/rpc.mountd
if [ $? -ne 0 ]; then
echo "ERROR: failed to start rpc.mountd."
return 1
fi
/usr/bin/exportfs -ra
if [ $? -ne 0 ]; then
echo "ERROR: failed to export filesystems."
return 1
fi
}
stop()
{
killall rpc.mountd
killall rpc.statd
killall rpcbind
}