From 87a4570d953040e68233d399dd1bf0ab7d208e31 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 2 Aug 2011 15:27:52 +0000 Subject: [PATCH] Add reqs for UpdateXpress execution, keep IMM USB NIC live across IMM resets, skip attempts to configure usb0 and ipmi_si where not appropriate git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10212 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot2/99-imm.rules | 1 + xCAT-nbroot2/install | 5 ++++- xCAT-nbroot2/setupimmnic | 3 +++ xCAT-nbroot2/xcat-cmdline.sh | 13 ++++++++----- 4 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 xCAT-nbroot2/99-imm.rules create mode 100644 xCAT-nbroot2/setupimmnic diff --git a/xCAT-nbroot2/99-imm.rules b/xCAT-nbroot2/99-imm.rules new file mode 100644 index 000000000..cbac9801a --- /dev/null +++ b/xCAT-nbroot2/99-imm.rules @@ -0,0 +1 @@ +SUBSYSTEM=="usb", ATTRS{idVendor}=="04b3", ATTRS{idProduct}=="4010", RUN+="/sbin/setupimmnic" diff --git a/xCAT-nbroot2/install b/xCAT-nbroot2/install index 476fb7345..168af7204 100755 --- a/xCAT-nbroot2/install +++ b/xCAT-nbroot2/install @@ -7,7 +7,8 @@ dracut_install mkswap df brctl vconfig ifenslave ssh-keygen /usr/bin/qemu-img /u dracut_install lldptool /lib64/libnss_dns-2.12.so /lib64/libnss_dns.so.2 dracut_install poweroff ntpq ntpd hwclock date /usr/share/terminfo/x/xterm /etc/nsswitch.conf /etc/services dracut_install /sbin/rsyslogd /etc/protocols umount -dracut_install chmod /lib/libc.so.6 /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libm.so.6 /sbin/route /sbin/ifconfig /usr/bin/head /etc/redhat-release ping tr lsusb #ibm fw wrapper requirements +dracut_install chmod /lib/libc.so.6 /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libm.so.6 /sbin/route /sbin/ifconfig /usr/bin/head /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements +dracut_install dmidecode /usr/lib64/libstdc++.so.6 #uxspi prereqs, but will use dmidecode to improve decision on loading ipmi_si dracut_install /usr/share/zoneinfo/posix/Zulu dracut_install /usr/share/zoneinfo/posix/GMT-0 dracut_install /usr/share/zoneinfo/posix/Europe/Istanbul @@ -589,6 +590,8 @@ inst "$moddir/bmcsetup" "/bin/bmcsetup" inst "$moddir/dhclient.conf" "/etc/dhclient.conf" inst "$moddir/dhclient-script" "/sbin/dhclient-script" inst "$moddir/rsyslog.conf" "/etc/rsyslog.conf" +inst "$moddir/99-imm.rules" "/etc/udev/rules.d/99-imm.rules" +inst "$moddir/setupimmnic" "/sbin/setupimmnic" dracut_install /sbin/rpc.statd /usr/sbin/sm-notify /etc/netconfig rpcbind /etc/host.conf /usr/sbin/rpc.idmapd dracut_install ps free find #debug inst_dir /var/lib/nfs diff --git a/xCAT-nbroot2/setupimmnic b/xCAT-nbroot2/setupimmnic new file mode 100644 index 000000000..3a532f346 --- /dev/null +++ b/xCAT-nbroot2/setupimmnic @@ -0,0 +1,3 @@ +#!/bin/sh +ip link set usb0 up +ip addr add dev usb0 169.254.95.120/16 diff --git a/xCAT-nbroot2/xcat-cmdline.sh b/xCAT-nbroot2/xcat-cmdline.sh index 7b44b91b0..0ced8791c 100755 --- a/xCAT-nbroot2/xcat-cmdline.sh +++ b/xCAT-nbroot2/xcat-cmdline.sh @@ -98,11 +98,14 @@ echo -n "Acquired IPv4 address " ip addr show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|grep -v inet6|grep inet|awk '{print $2}' ntpd -g -x (while ! ntpq -c "rv 0 state"|grep 'state=4' > /dev/null; do sleep 1; done; hwclock --systohc) & -modprobe cdc_ether -modprobe ipmi_si -modprobe ipmi_devintf -ip link set usb0 up -ip addr add dev usb0 169.254.95.120/16 +if dmidecode|grep IPMI > /dev/null; then + modprobe ipmi_si + modprobe ipmi_devintf +fi +if lsusb -d 04b3:4010 > /dev/null; then + modprobe cdc_ether + /sbin/setupimmnic +fi if [ "$destiny" = "discover" ]; then #skip a query to xCAT when /proc/cmdline will do /bin/dodiscovery fi