diff --git a/mkinitrd-boot.sh b/mkinitrd-boot.sh index 1e0c8c4..5f9543b 100644 --- a/mkinitrd-boot.sh +++ b/mkinitrd-boot.sh @@ -2,7 +2,7 @@ #%stage: block #%modules: nfs #%programs: /sbin/mount.nfs -#%if: "$rootfstype" = "nfs" -o "$interface" +#%if: "$rootfstype" = "nfs" -a "$interface" # ##### Network FileSystem ## @@ -22,6 +22,8 @@ if [ -n "$ROOTPATH" -a -z "$cmd_root" ] ; then case "$ROOTPATH" in + iscsi:*) + ;; *:*) rootfstype="nfs" rootdev="$ROOTPATH" ;; @@ -40,17 +42,17 @@ if [ -n "$ROOTPATH" -a -z "$cmd_root" ] ; then fi 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 + 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 + rootfsmod= if [ -n "$rootflags" ] ; then rootflags="${rootflags},nolock" diff --git a/nfs-utils.changes b/nfs-utils.changes index 4483717..99d32b8 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,22 @@ +Fri Mar 26 15:39:05 CET 2010 - mmarek@suse.cz + +- mkinitrd-boot.sh: Do not do anything over if iscsi should be used + (bnc#590135). + +------------------------------------------------------------------- +------------------------------------------------------------------- +Tue Mar 9 21:18:22 UTC 2010 - nfbrown@novell.com + +- init.nfs: also call 'udevadm settle' when mounting things + other than /usr and /opt. bnc#571540 + +------------------------------------------------------------------- +Tue Feb 23 22:15:18 UTC 2010 - nfbrown@novell.com + +- init.nfs: if mounting /usr fails, call "udevadm settle" + and try again incase network interfaces are still + appearing. bnc#571540 + ------------------------------------------------------------------- Sun Nov 29 22:03:26 UTC 2009 - nfbrown@novell.com diff --git a/nfs-utils.spec b/nfs-utils.spec index 399cd96..a25455b 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -1,7 +1,7 @@ # # spec file for package nfs-utils (Version 1.2.1) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,7 +27,7 @@ BuildRequires: libevent Url: http://nfs.sourceforge.net Summary: Support Utilities for Kernel nfsd Version: 1.2.1 -Release: 2 +Release: 3 Group: Productivity/Networking/NFS License: GPLv2+ BuildRoot: %{_tmppath}/%{name}-%{version}-build diff --git a/nfs.init b/nfs.init index 0a281e5..a1c851f 100644 --- a/nfs.init +++ b/nfs.init @@ -134,7 +134,11 @@ mount_usr() { test -n "$usr" -o -n "$opt" || return local where for where in $usr $opt ; do - mount -o nolock $where + mount -o nolock $where || { + # maybe network device hasn't appeared yet. + udevadm settle + mount -o nolock $where + } done } @@ -223,7 +227,14 @@ case "$1-$nfs" in # sleep 2 && mount -at nfs,nfs4 & # sleep 2 # - if test "$nfs" = yes ; then + if test -n "$mnt" ; then + # If network devices are not yet discovered, mounts + # might fail, so we might need to 'udevadm settle' to + # wait for the interfaces. + # We cannot try the mount and on failure: 'settle' and try again + # as if there are 'bg' mounts, we could get multiple copies + # of them. So always 'settle' if there is any mounting to do. + udevadm settle mount -at nfs,nfs4 > /dev/null 2>&1 fi # diff --git a/ready b/ready deleted file mode 100644 index 473a0f4..0000000