dracut-module-setup: Enhance ISCSI to support ipv6 protocol
Due to the different format between ipv4 and ipv6 protocol, quote the ipv6 address with bracket "[]" to make dracut notify. Signed-off-by: Minfei Huang <mhuang@redhat.com> Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
parent
2ba32c6ccf
commit
ea13e7ab98
@ -542,10 +542,12 @@ kdump_setup_iscsi_device() {
|
|||||||
kdump_setup_netdev $netdev $srcaddr
|
kdump_setup_netdev $netdev $srcaddr
|
||||||
|
|
||||||
# prepare netroot= command line
|
# prepare netroot= command line
|
||||||
# FIXME: IPV6 addresses require explicit [] around $tgt_ipaddr
|
|
||||||
# FIXME: Do we need to parse and set other parameters like protocol, port
|
# FIXME: Do we need to parse and set other parameters like protocol, port
|
||||||
# iscsi_iface_name, netdev_name, LUN etc.
|
# iscsi_iface_name, netdev_name, LUN etc.
|
||||||
|
|
||||||
|
if is_ipv6_address $tgt_ipaddr; then
|
||||||
|
tgt_ipaddr="[$tgt_ipaddr]"
|
||||||
|
fi
|
||||||
netroot_str="netroot=iscsi:${userpwd_str}${userpwd_in_str}@$tgt_ipaddr::::$tgt_name"
|
netroot_str="netroot=iscsi:${userpwd_str}${userpwd_in_str}@$tgt_ipaddr::::$tgt_name"
|
||||||
|
|
||||||
[[ -f $netroot_conf ]] || touch $netroot_conf
|
[[ -f $netroot_conf ]] || touch $netroot_conf
|
||||||
|
Loading…
Reference in New Issue
Block a user