95nfs: Fix mount if IPv4 address is used in /etc/fstab
Signed-off-by: Thomas Renninger <trenn@suse.com>master
parent
611b8ae0d7
commit
f5c10673de
|
|
@ -51,9 +51,9 @@ cmdline() {
|
|||
|
||||
### ip= ###
|
||||
if [[ $nfs_device = [0-9]*\.[0-9]*\.[0-9]*.[0-9]* ]] || [[ $nfs_device = \[.*\] ]]; then
|
||||
nfs_address="$nfs_device"
|
||||
nfs_address="${nfs_device%%:*}"
|
||||
else
|
||||
lookup=$(host $(echo ${nfs_device%%:*})| head -n1)
|
||||
lookup=$(host "${nfs_device%%:*}"| head -n1)
|
||||
nfs_address=${lookup##* }
|
||||
fi
|
||||
ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p')
|
||||
|
|
|
|||
Loading…
Reference in New Issue