summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2013-02-20 14:02:54 +0100
committerRadek Vykydal <rvykydal@redhat.com>2013-02-25 15:16:43 +0100
commit7bbef9e1291fe9d17254980d280a7123711af51b (patch)
treede198f29a51784b79385d2736ec787f8077d7f45
parent9f141e324beb1f34c6522aa5a8c05fb3f8d0befa (diff)
downloadanaconda-7bbef9e1291fe9d17254980d280a7123711af51b.tar.gz
anaconda-7bbef9e1291fe9d17254980d280a7123711af51b.tar.xz
anaconda-7bbef9e1291fe9d17254980d280a7123711af51b.zip
Fix ksdevice=<MAC> - instead of renaming the device to ksdev0 just use it
ksdevice option doesn't work in f17 and f18. It used to specify which network device to activate in early stage of installation, eg. to fetch kickstart or installation image. In F17 and F18 the device should be specified by dracut option ip= Mapping of ksdevice options from loader to dracut options used in F17 and F18: - ksdevice missing (and network is required) loader: user was asked in UI in case of more devices present dracut: activates all devices if not specified - ksdevice=eth0 loader: eth0 is activated dracut: specify device in ip=, eg ip=eth0:dhcp ip=10.34.39.44::10.34.39.254:255.255.255.0::eth0:none - ksdevice=00:12:34:56:78:9a loader: device with MAC address is activated dracut: We translate it to ifname=ksdev0:00:12:34:56:78:9a which renames the device. It is possible to use BOOTIF=00-12-34-56-78-9a, which this patch does. - ksdevice=link loader: first device with link found is activated dracut: all devices with link are activated (default dracut behaviour for not specified device) - ksdevice=ibft loader: activate devcie configrued in iBFT dracut: use ip=ibft option
-rwxr-xr-xdracut/parse-anaconda-net.sh22
1 files changed, 18 insertions, 4 deletions
diff --git a/dracut/parse-anaconda-net.sh b/dracut/parse-anaconda-net.sh
index 411b1f59d..0b8e6bf44 100755
--- a/dracut/parse-anaconda-net.sh
+++ b/dracut/parse-anaconda-net.sh
@@ -5,6 +5,15 @@ net_conf=/etc/cmdline.d/75-anaconda-network-options.conf
check_depr_arg "dns" "nameserver=%s"
+mac_to_bootif() {
+ local bootif=${1}
+ local IFS=':'
+ bootif=$(for i in ${bootif} ; do echo -n $i-; done)
+ bootif=${bootif%-}
+ bootif="01-$bootif"
+ echo $bootif
+}
+
# handle ksdevice (tell us which device to use for ip= stuff later)
export ksdevice=""
ksdev_val=$(getarg ksdevice=)
@@ -16,15 +25,20 @@ if [ -n "$ksdev_val" ]; then
ibft)
warn "'ksdevice=ibft' is deprecated. Using 'ip=ibft' instead."
echo "ip=ibft" > $net_conf
- ksdevice="ibft0"
;;
bootif)
warn "'ksdevice=bootif' does nothing (BOOTIF is used by default if present)"
;;
??:??:??:??:??:??)
- warn "'ksdevice=<MAC>' is deprecated. Using 'ifname=ksdev0:<MAC>' instead."
- ksdevice="ksdev0"
- echo "ifname=$ksdevice:$ksdev_val" > $net_conf
+
+ BOOTIF=$(getarg 'BOOTIF=')
+ if [ -n "$BOOTIF" ] ; then
+ warn "'ksdevice=<MAC>' is deprecated. Supplied BOOTIF takes precedence."
+ else
+ bootif=$(mac_to_bootif "$ksdev_val")
+ warn "'ksdevice=<MAC>' is deprecated. Using BOOTIF=$bootif instead."
+ echo "BOOTIF=$bootif" > $net_conf
+ fi
;;
*) ksdevice="$ksdev_val" ;;
esac