Reported-by: Seewer Philippe <[email protected]>
---
 modules.d/95nfs/nfs-netroot.sh |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/modules.d/95nfs/nfs-netroot.sh b/modules.d/95nfs/nfs-netroot.sh
index 0591a31..8d552e9 100755
--- a/modules.d/95nfs/nfs-netroot.sh
+++ b/modules.d/95nfs/nfs-netroot.sh
@@ -14,6 +14,10 @@ if [ "$root" = "dhcp" -o "$root" = "nfs" -o "$root" = "nfs4" 
]; then
        if check_occurances "$new_root_path" ':' 2; then
            root="$nfsver:$new_root_path"
        fi ;;
+    *:/*,*)
+       if check_occurances "$new_root_path" ':' 1; then
+           root="$nfsver:$new_root_path"
+       fi ;;
     *:/*)
        if check_occurances "$new_root_path" ':' 1; then
            root="$nfsver:$new_root_path:"
@@ -22,6 +26,10 @@ if [ "$root" = "dhcp" -o "$root" = "nfs" -o "$root" = "nfs4" 
]; then
        if check_occurances "$new_root_path" ':' 1; then
            root="$nfsver::$new_root_path"
        fi ;;
+    /*,*)
+       if check_occurances "$new_root_path" ':' 0; then
+           root="$nfsver::$new_root_path"
+       fi ;;
     /*)
        if check_occurances "$new_root_path" ':' 0; then
            root="$nfsver::$new_root_path:"
@@ -40,6 +48,14 @@ if [ -z "${root%%nfs:*}" -o -z "${root%%nfs4:*}" ]; then
     if [ -z "$nfsserver" -o "$nfsserver" = "$nfspath" ]; then
        nfsserver=$new_dhcp_server_identifier
     fi
+
+    # Handle alternate syntax of path,options
+    if [ "$nfsflags" = "$nfspath" -a "${root#*,}" != "$root" ]; then
+       nfspath=${root%%,*}
+       nfsflags=${root#*,}
+    fi
+
+    # Catch the case when no additional flags are set
     if [ "$nfspath" = "$nfsflags" ]; then
        unset nfsflags
     fi
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to