|
|
64b87c |
From 4350c73199b3d2ac1e22b5e2e093de12ca5ad598 Mon Sep 17 00:00:00 2001
|
|
|
64b87c |
From: Harald Hoyer <harald@redhat.com>
|
|
|
64b87c |
Date: Thu, 2 Jul 2015 15:21:35 +0200
|
|
|
64b87c |
Subject: [PATCH] nfs/nfs-lib.sh: add anaconda_nfsv6_to_var()
|
|
|
64b87c |
|
|
|
64b87c |
add "nfs:[[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]]/path" style parsing
|
|
|
64b87c |
|
|
|
64b87c |
https://bugzilla.redhat.com/show_bug.cgi?id=1190098
|
|
|
64b87c |
(cherry picked from commit ba665de454e7d6ef1da4ba95308fb9f65c7a9497)
|
|
|
64b87c |
---
|
|
|
64b87c |
modules.d/95nfs/nfs-lib.sh | 18 ++++++++++++++++++
|
|
|
64b87c |
1 file changed, 18 insertions(+)
|
|
|
64b87c |
|
|
|
64b87c |
diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh
|
|
|
1755ca |
index bf7d044b..4f24f698 100755
|
|
|
64b87c |
--- a/modules.d/95nfs/nfs-lib.sh
|
|
|
64b87c |
+++ b/modules.d/95nfs/nfs-lib.sh
|
|
|
64b87c |
@@ -17,6 +17,7 @@ nfs_to_var() {
|
|
|
64b87c |
# FIXME: local netif=${2:-$netif}?
|
|
|
64b87c |
case "$1" in
|
|
|
64b87c |
nfs://*) rfc2224_nfs_to_var "$1" ;;
|
|
|
64b87c |
+ nfs:*[*) anaconda_nfsv6_to_var "$1" ;;
|
|
|
64b87c |
nfs:*:*:/*) anaconda_nfs_to_var "$1" ;;
|
|
|
64b87c |
*) nfsroot_to_var "$1" ;;
|
|
|
64b87c |
esac
|
|
|
64b87c |
@@ -86,6 +87,23 @@ anaconda_nfs_to_var() {
|
|
|
64b87c |
path="/${1##*:/}"
|
|
|
64b87c |
}
|
|
|
64b87c |
|
|
|
64b87c |
+# IPv6 nfs path will be treated separately
|
|
|
64b87c |
+anaconda_nfsv6_to_var() {
|
|
|
64b87c |
+ nfs="nfs"
|
|
|
64b87c |
+ path="$1:"
|
|
|
64b87c |
+ options="${path#*:/}"
|
|
|
64b87c |
+ path="/${options%%:*}"
|
|
|
64b87c |
+ server="${1#*nfs:}"
|
|
|
64b87c |
+ if str_starts $server '['; then
|
|
|
64b87c |
+ server="${server%:/*}"
|
|
|
64b87c |
+ options="${options#*:*}"
|
|
|
64b87c |
+ else
|
|
|
64b87c |
+ server="${server%:/*}"
|
|
|
64b87c |
+ options="${server%%:*}"
|
|
|
64b87c |
+ server="${server#*:}"
|
|
|
64b87c |
+ fi
|
|
|
64b87c |
+}
|
|
|
64b87c |
+
|
|
|
64b87c |
# nfsroot_from_dhcp NETIF
|
|
|
64b87c |
# fill in missing server/path from DHCP options.
|
|
|
64b87c |
nfsroot_from_dhcp() {
|