[PATCH 07/10] dracut: fix old-style static ip=xxx gw=yyy...

Will Woods wwoods at redhat.com
Fri Aug 17 22:30:44 UTC 2012


If we parse "ip=... gw=..." and emit a new "ip=..." line, we end up with
multiple conflicting ip= args for that device. This makes dracut panic
with:

  "Sorry, 'ip=$p' does not make sense for multiple interface
  configurations"

Luckily dracut handles old-style anaconda ip=... arguments now, so we
can just drop this block of code and fix the problem. Yay!
---
 dracut/parse-anaconda-net.sh | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/dracut/parse-anaconda-net.sh b/dracut/parse-anaconda-net.sh
index 4a69280..87dd775 100755
--- a/dracut/parse-anaconda-net.sh
+++ b/dracut/parse-anaconda-net.sh
@@ -45,20 +45,6 @@ elif [ -n "$ipv6" ]; then # just ipv6
         dhcp) check_depr_arg "ipv6=dhcp"  "ip=${ksdevice:+$ksdevice:}dhcp6" ;;
         *)    check_depr_arg "ipv6="      "ip=${ksdevice:+$ksdevice:}[%s]" ;;
     esac
-elif [ -n "$ip" ]; then # just good ol' ipv4
-    case "$ip" in
-      dhcp|*:*) ;; # these are acceptable for dracut
-      *.*.*.*)
-          nm="$(getarg netmask=)" || warn "ip=<ip> missing gateway=<gw>!"
-          gw="$(getarg gateway=)" || warn "ip=<ip> missing netmask=<nm>!"
-          if [ -n "$nm" ] && [ -n "$gw" ]; then
-              warn "'ip=<ip> gateway=<gw> netmask=<nm>' is deprecated."
-              warn "Use 'ip=<ip>::<gw>:<nm>[:<dev>]' instead."
-              strstr "$gw" ":" && gw="[$gw]" # put ipv6 addr in brackets
-              echo "ip=$ip::$gw:$nm${ksdevice:+:$ksdevice}" >> $net_conf
-          fi
-      ;;
-    esac
 fi
 
 [ -n "$ip$ipv6$ksdev_val" ] && set_neednet
-- 
1.7.11.2



More information about the anaconda-patches mailing list