commit e5ec74de32d224a215757ec5371aaafb83eef6b8 Author: Hannes Reinecke Date: Tue Apr 13 09:00:25 2010 +0200 Delete ibft mkinitrd scripts The iBFT mkinitrd scripts are moved to the mkinitrd package. Remove them here. And we can also remove any ibft parsing as this is done in the iBFT scripts. Signed-off-by: Hannes Reinecke diff --git a/Makefile b/Makefile index 20fc864..bef040f 100644 --- a/Makefile +++ b/Makefile @@ -101,10 +101,6 @@ install_initd_suse: $(DESTDIR)$(mkinitrd)/setup-iscsi.sh $(INSTALL) -m 755 etc/mkinitrd/mkinitrd-stop.sh \ $(DESTDIR)$(mkinitrd)/boot-killiscsi.sh - $(INSTALL) -m 755 etc/mkinitrd/ibft-boot.sh \ - $(DESTDIR)$(mkinitrd)/boot-ibft.sh - $(INSTALL) -m 755 etc/mkinitrd/ibft-setup.sh \ - $(DESTDIR)$(mkinitrd)/setup-ibft.sh install_initd_redhat: $(INSTALL) -d $(DESTDIR)$(initddir) diff --git a/etc/mkinitrd/ibft-boot.sh b/etc/mkinitrd/ibft-boot.sh deleted file mode 100644 index 8c76810..0000000 --- a/etc/mkinitrd/ibft-boot.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -#%stage: device -#%modules: iscsi_ibft -#%if: "$ibft_available" -#: ${ibft_nic:=/sys/firmware/ibft/ethernet0} -# -###### iBFT network configuration -## -## This script obtains network configuration parameters -## from the iBFT, if available - -load_modules - -ibft_get_att() { - if [ -f $ibft_nic/$1 ]; then - cat $ibft_nic/$1 - else - echo "" - fi -} - -ibft_get_ethdev() { - (cd $ibft_nic/device/net; ls -d eth* 2>/dev/null) -} - -ibft_get_initiatorname() { - cat /sys/firmware/ibft/initiator/initiator-name -} - -print_par() { - local val - while [ $# -gt 0 ]; do - eval "val=\$$1" - echo "[IBFT] $1='$val'" - shift - done -} - -if [ -d $ibft_nic ]; then - if [ -s $ibft_nic/dhcp ]; then - read ibft_dhcp < $ibft_nic/dhcp - if [ "$ibft_dhcp" = "0.0.0.0" ] ; then - nettype='static' - else - nettype='dhcp' - fi - else - nettype='static' - fi - ip="$(ibft_get_att ip-addr)::$(ibft_get_att gateway):$(ibft_get_att subnet-mask):$ibft_hostname:$(ibft_get_ethdev):$nettype" - interface=$(ibft_get_ethdev) - macaddress=$(ibft_get_att mac) - InitiatorName=$(ibft_get_initiatorname) -fi diff --git a/etc/mkinitrd/ibft-setup.sh b/etc/mkinitrd/ibft-setup.sh deleted file mode 100644 index b3137ed..0000000 --- a/etc/mkinitrd/ibft-setup.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -#%stage: device -#%depends: network - -ibft_set_iface() { - local if=$(cd $ibft_nic/device/net; ls -d eth* 2>/dev/null) - [ "$if" ] && { - interface=$if - if [ ! "$nettype" -a -e $ibft_nic/dhcp ]; then - nettype=dhcp - else - nettype=static - fi - } -} - -ibft_nic=/sys/firmware/ibft/ethernet0 -ibft_hostname=$(hostname) - -if [ "$root_iscsi" = 1 -a -d $ibft_nic ]; then - ibft_available=1 - ibft_set_iface -fi -save_var ibft_available -save_var ibft_hostname -save_var ibft_nic diff --git a/etc/mkinitrd/mkinitrd-setup.sh b/etc/mkinitrd/mkinitrd-setup.sh index e376287..523ef9d 100644 --- a/etc/mkinitrd/mkinitrd-setup.sh +++ b/etc/mkinitrd/mkinitrd-setup.sh @@ -65,33 +65,5 @@ if [ "${root_iscsi}" ]; then # copy the iscsi configuration cp -rp /etc/iscsi etc/ - if [ -d /sys/firmware/ibft ] ; then - # copy iBFT interface - for ibft_if in /sys/firmware/ibft/ethernet* ; do - read ibft_flags < $ibft_if/flags - # Bit1 is 'Firmware boot selected' - if (( $ibft_flags & 2 )) ; then - for if in $ibft_if/device/net/* ; do - if [ -d $if ] ; then - interface="${if##*/}" - break; - fi - done - fi - [ "$interface" ] || continue - # Type 3 of 'origin' is DHCP - read ibft_origin < $ibft_if/origin - if [ $ibft_origin == 3 ] ; then - nettype="dhcp" - else - nettype="static" - fi - done - fi - - if [ -z "$interface" ] ; then - interface="default" - fi - save_var TargetPort 3260 # in case the port was not defined via command line we assign a default port fi