Add nfs-kernel-server package. Closes #500
git-svn-id: svn://svn.openwrt.org/openwrt/packages@4129 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
3d1db44950
commit
9ae7e8f1a5
73
net/nfs-kernel-server/Makefile
Normal file
73
net/nfs-kernel-server/Makefile
Normal file
@ -0,0 +1,73 @@
|
||||
# $Id: Makefile 4033 2006-06-21 02:32:39Z nbd $
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nfs-kernel-server
|
||||
PKG_VERSION:=1.0.7
|
||||
PKG_RELEASE:=1
|
||||
PKG_MD5SUM:=8f863120261cd572ad320a9152581e11
|
||||
|
||||
PKG_SOURCE_URL:=@SF/nfs
|
||||
PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.gz
|
||||
PKG_CAT:=zcat
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
|
||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/nfs-kernel-server
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Kernel NFS server support
|
||||
DESCRIPTION:=Kernel NFS server support
|
||||
URL:=http://nfs.sourceforge.net/
|
||||
endef
|
||||
|
||||
define Package/nfs-kernel-server-utils
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=NFS server utils
|
||||
DESCRIPTION:=NFS server utils
|
||||
URL:=http://nfs.sourceforge.net
|
||||
DEPENDS:=nfs-kernel-server
|
||||
DEFAULT:=y
|
||||
endef
|
||||
|
||||
|
||||
define Package/nfs-kernel-server/conffiles
|
||||
/etc/exports
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default,--enable-static --enable-shared --disable-nfsv4 \
|
||||
--disable-gss,ac_cv_func_malloc_0_nonnull=yes \
|
||||
ac_cv_func_memcmp_working=yes \
|
||||
ac_cv_func_setvbuf_reversed=no)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
rm -rf $(PKG_INSTALL_DIR)
|
||||
mkdir -p $(PKG_INSTALL_DIR)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Package/nfs-kernel-server/install
|
||||
install -d -m755 $(1)/etc/init.d $(1)/usr/sbin
|
||||
install -m0644 ./files/nfsd.exports $(1)/etc/exports
|
||||
install -m0755 ./files/nfsd.init $(1)/etc/init.d/S60nfsd
|
||||
install -m0755 $(PKG_BUILD_DIR)/utils/lockd/lockd $(1)/usr/sbin/rpc.lockd
|
||||
install -m0755 $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd
|
||||
install -m0755 $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd
|
||||
install -m0755 $(PKG_BUILD_DIR)/utils/mountd/mountd $(1)/usr/sbin/rpc.mountd
|
||||
install -m0755 $(PKG_BUILD_DIR)/utils/exportfs/exportfs $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/nfs-kernel-server-utils/install
|
||||
install -d -m0755 $(1)/usr/sbin
|
||||
install -m0755 $(PKG_BUILD_DIR)/utils/showmount/showmount $(1)/usr/sbin
|
||||
install -m0755 $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,nfs-kernel-server))
|
||||
$(eval $(call BuildPackage,nfs-kernel-server-utils))
|
1
net/nfs-kernel-server/files/nfsd.exports
Normal file
1
net/nfs-kernel-server/files/nfsd.exports
Normal file
@ -0,0 +1 @@
|
||||
/mnt *(ro,all_squash,insecure,sync)
|
47
net/nfs-kernel-server/files/nfsd.init
Normal file
47
net/nfs-kernel-server/files/nfsd.init
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
NFS_D=/var/lib/nfs
|
||||
|
||||
_start() {
|
||||
mkdir -p $NFS_D
|
||||
touch $NFS_D/rmtab
|
||||
|
||||
/usr/sbin/rpc.statd
|
||||
/usr/sbin/rpc.lockd
|
||||
/usr/sbin/exportfs -r
|
||||
/usr/sbin/rpc.nfsd
|
||||
/usr/sbin/rpc.mountd
|
||||
}
|
||||
|
||||
_stop() {
|
||||
killall rpc.mountd 2> /dev/null
|
||||
killall -9 nfsd 2> /dev/null
|
||||
/usr/sbin/exportfs -au
|
||||
killall lockd 2> /dev/null
|
||||
killall rpc.statd 2> /dev/null
|
||||
}
|
||||
|
||||
_reload() {
|
||||
/usr/sbin/exportfs -r
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
_start
|
||||
;;
|
||||
stop)
|
||||
_stop
|
||||
;;
|
||||
reload)
|
||||
_reload
|
||||
;;
|
||||
restart)
|
||||
_stop
|
||||
sleep 1
|
||||
_start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 (start|stop|reload|restart)"
|
||||
exit 1
|
||||
esac
|
||||
exit $?
|
18
net/nfs-kernel-server/patches/nfs-utils-1.0.6-uclibc.patch
Normal file
18
net/nfs-kernel-server/patches/nfs-utils-1.0.6-uclibc.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- nfs-utils-1.0.6/support/nfs/svc_socket.c.orig 2004-12-12 06:43:52.000000000 +0000
|
||||
+++ nfs-utils-1.0.6/support/nfs/svc_socket.c 2004-12-12 06:50:04.000000000 +0000
|
||||
@@ -66,6 +66,7 @@
|
||||
__bzero ((char *) &addr, sizeof (addr));
|
||||
addr.sin_family = AF_INET;
|
||||
|
||||
+#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
|
||||
ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
|
||||
&rpcp);
|
||||
if (ret == 0 && rpcp != NULL)
|
||||
@@ -99,6 +100,7 @@
|
||||
}
|
||||
}
|
||||
else
|
||||
+#endif /* ! __UCLIBC__ */
|
||||
{
|
||||
if (bindresvport (sock, &addr))
|
||||
{
|
2696
net/nfs-kernel-server/patches/nfs-utils_1.0.7-3_debian.patch
Normal file
2696
net/nfs-kernel-server/patches/nfs-utils_1.0.7-3_debian.patch
Normal file
File diff suppressed because it is too large
Load Diff
2326
net/nfs-kernel-server/patches/rpcgen_sources.patch
Normal file
2326
net/nfs-kernel-server/patches/rpcgen_sources.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user