nfs-utils: backported library.

This commit is contained in:
Ricardo Martins 2015-03-02 16:51:05 +00:00
parent e9c2f389fd
commit 4d32c16079
2 changed files with 107 additions and 0 deletions

View File

@ -0,0 +1,56 @@
version=\
(
'1.3.1'
)
url=\
(
"http://downloads.sourceforge.net/nfs/$version/nfs-utils-$version.tar.bz2"
)
md5=\
(
'97f157f954edb6d4d4385a0c5986f36f'
)
maintainer=\
(
'Ricardo Martins <rasm@fe.up.pt>'
)
requires=\
(
'libtirpc/default'
)
configure()
{
"../nfs-utils-$version/configure" \
--target="$cfg_target_canonical" \
--host="$cfg_target_canonical" \
--build="$cfg_host_canonical" \
--prefix="$cfg_dir_rootfs/usr" \
--disable-gss \
--disable-svcgss \
--disable-ipv6 \
--disable-tirpc \
--disable-uuid \
--disable-nfsv4 \
--without-tcp-wrappers
}
build()
{
$cmd_make
}
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" &&
$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 "$cfg_package_spec_dir/fs" -c -f - . | tar -C "$cfg_dir_rootfs" -x -v -f -
}

View File

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