nfs-utils: install empty exports.

This commit is contained in:
Ricardo Martins 2015-03-16 12:29:01 +00:00
parent 94c685de8f
commit 94e05e581f
2 changed files with 2 additions and 53 deletions

View File

@ -47,10 +47,10 @@ build()
target_install()
{
$cmd_target_strip -v "utils/mount/mount.nfs" -o "$cfg_dir_rootfs/usr/bin/mount.nfs" &&
ln -fs mount.nfs "$cfg_dir_rootfs/usr/bin/unmount.nfs" &&
ln -fs mount.nfs "$cfg_dir_rootfs/usr/bin/unmount.nfs" &&
$cmd_target_strip -v "utils/exportfs/exportfs" -o "$cfg_dir_rootfs/usr/bin/exportfs" &&
$cmd_target_strip -v "utils/mountd/mountd" -o "$cfg_dir_rootfs/usr/bin/rpc.mountd" &&
$cmd_target_strip -v "utils/nfsd/nfsd" -o "$cfg_dir_rootfs/usr/bin/rpc.nfsd" &&
$cmd_target_strip -v "utils/statd/statd" -o "$cfg_dir_rootfs/usr/bin/rpc.statd" &&
tar -C "$pkg_dir/fs" -c -f - . | tar -C "$cfg_dir_rootfs" -x -v -f -
touch "$cfg_dir_rootfs/etc/exports"
}

View File

@ -1,51 +0,0 @@
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
}