OBS User unknown 2008-07-25 02:07:57 +00:00 committed by Git OBS Bridge
parent 4d87a756de
commit 466f766636
4 changed files with 83 additions and 1 deletions

54
mkinitrd-boot.sh Normal file
View File

@ -0,0 +1,54 @@
#!/bin/bash
#%stage: block
#%modules: nfs
#%programs: /sbin/mount.nfs
#%if: "$rootfstype" = "nfs" -o "$interface"
#
##### Network FileSystem
##
## This is where NFS gets mounted.
## If no root= option was given, the root device will be taken from the DHCP-server.
##
## Command line parameters
## -----------------------
##
## root=<server>:/<folder> the nfs root path
##
if [ -z "$rootdev" ]; then
# ROOTPATH gets set via dhcpcd
case "$ROOTPATH" in
"") ;;
*:*)
rootfstype="nfs"
rootdev="$ROOTPATH" ;;
*)
if [ -n "$DHCPSIADDR" ]; then
rootdev="$DHCPSIADDR:$ROOTPATH"
rootfstype="nfs"
elif [ -n "$DHCPSNAME" ]; then
rootdev="$DHCPSNAME:$ROOTPATH"
rootfstype="nfs"
fi ;;
esac
fi
if [ -z "$rootdev" ]; then
echo "no local root= kernel option given and no root server set by the dhcp server."
echo "exiting to /bin/sh"
cd /
PATH=$PATH PS1='$ ' /bin/sh -i
fi
if [ "$rootfstype" = "nfs" ]; then
# load the nfs module before using it
load_modules
rootfsmod=
if [ -n "$rootflags" ] ; then
rootflags="${rootflags},nolock"
else
rootflags="nolock"
fi
else
dont_load_modules
fi

9
mkinitrd-setup.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
#
#%stage: device
#
if [ "$rootfstype" = "nfs" ]; then
interface=${interface:-default}
save_var rootfstype
fi

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jul 23 16:42:58 CEST 2008 - hare@suse.de
- Include mkinitrd scriptlets.
- Do not install Makefiles for nfs-doc.
-------------------------------------------------------------------
Tue Jul 15 08:33:13 CEST 2008 - nfbrown@suse.de

View File

@ -15,7 +15,7 @@ BuildRequires: e2fsprogs-devel gcc-c++ krb5-devel libevent libgssglue-devel lib
Url: http://nfs.sourceforge.net
Summary: Support Utilities for Kernel nfsd
Version: 1.1.2
Release: 12
Release: 13
Group: Productivity/Networking/NFS
License: GPL v2 or later
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -31,6 +31,8 @@ Source5: nfs-kernel-server.xml
Source6: README.NFSv4
Source7: fw-client
Source8: fw-server
Source9: mkinitrd-setup.sh
Source10: mkinitrd-boot.sh
Patch0: nfs-utils-largefiles.patch
Patch1: nfs-utils-1.0.7-bind-syntax.patch
Patch2: nfs-utils-1.1.2-start-statd.patch
@ -137,6 +139,7 @@ done
%install
make install DESTDIR=$RPM_BUILD_ROOT
rm -f linux-nfs/Makefile*
# rc-script
install -d $RPM_BUILD_ROOT/etc/init.d
install -m 744 %{SOURCE3} $RPM_BUILD_ROOT/etc/init.d/nfsserver
@ -159,6 +162,9 @@ touch $RPM_BUILD_ROOT/var/lib/nfs/state
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services
install -m 0644 %{SOURCE7} ${RPM_BUILD_ROOT}/etc/sysconfig/SuSEfirewall2.d/services/nfs-client
install -m 0644 %{SOURCE8} ${RPM_BUILD_ROOT}/etc/sysconfig/SuSEfirewall2.d/services/nfs-kernel-server
install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts
install -m 755 %{S:9} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-nfs.sh
install -m 755 %{S:10} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-nfs.sh
%clean
rm -rf $RPM_BUILD_ROOT
@ -190,6 +196,10 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root)
%config /etc/init.d/nfs
%config /etc/idmapd.conf
%dir /lib/mkinitrd
%dir /lib/mkinitrd/scripts
/lib/mkinitrd/scripts/setup-nfs.sh
/lib/mkinitrd/scripts/boot-nfs.sh
%verify(not mode) %attr(0755,root,root) /sbin/mount.nfs
/sbin/mount.nfs4
/sbin/umount.nfs
@ -257,6 +267,9 @@ rm -rf $RPM_BUILD_ROOT
%doc nfs/*.html nfs/*.ps linux-nfs/* README.NFSv4
%changelog
* Wed Jul 23 2008 hare@suse.de
- Include mkinitrd scriptlets.
- Do not install Makefiles for nfs-doc.
* Tue Jul 15 2008 nfbrown@suse.de
- nfs.init - parse /etc/fstab correctly. The first two fields
are "what where", not "where what" (bnc#364513)