419aa05c18
-Relax cipher suite 1, which still requires a password, cipher suite 0 remains banned from access as it cannot be secured at all git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@721 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
99 lines
2.7 KiB
Bash
Executable File
99 lines
2.7 KiB
Bash
Executable File
#!/bin/sh
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
|
nic=0
|
|
hba=0
|
|
|
|
MOD=""
|
|
|
|
#Load common usb drivers
|
|
modprobe ohci-hcd
|
|
modprobe uhci-hcd
|
|
modprobe ehci-hcd
|
|
for i in $(lspci -n | awk '{print $1 "%" $3}')
|
|
do
|
|
PCI=$(echo $i | awk -F% '{print $1}')
|
|
VID="0x0000$(echo $i | awk -F% '{print $2}' |awk -F: '{print $1}')"
|
|
DID="0x0000$(echo $i | awk -F% '{print $2}' |awk -F: '{print $2}')"
|
|
if egrep "^[^ ]*[ ]*$VID[ ]*$DID" /lib/modules/*/modules.pcimap >/dev/null
|
|
then
|
|
TYPE=$(
|
|
lspci | \
|
|
grep "^$PCI " | \
|
|
awk '{print $2}' | \
|
|
tr '[A-Z]' '[a-z]'
|
|
)
|
|
DESC=$(
|
|
lspci | \
|
|
grep "^$PCI " | \
|
|
awk -F: '{print $3}' | \
|
|
sed 's/^ *//'
|
|
)
|
|
MOD=$(
|
|
egrep "^[^ ]*[ ]*$VID[ ]*$DID" /lib/modules/*/modules.pcimap | \
|
|
head -1 | \
|
|
awk '{print $1}' | \
|
|
tr -d '"'
|
|
)
|
|
case "$TYPE" in
|
|
ethernet|network)
|
|
echo "Found ($MOD) $DESC"
|
|
GOTNIC=1
|
|
if [ "$MOD" = "gm" ]
|
|
then
|
|
echo "alias myri0 $MOD"
|
|
echo "alias myri0 $MOD" >>/etc/modules.conf
|
|
echo "alias myri0 $MOD" >>/etc/modprobe.conf
|
|
else
|
|
modprobe $MOD
|
|
udhcpc -i eth$nic -b
|
|
let extrat=0
|
|
until ifconfig eth$nic|grep "inet addr" || [ $extrat == 30 ]; do
|
|
sleep 1
|
|
let extrat=extrat+1
|
|
done
|
|
nic=$(($nic + 1))
|
|
fi
|
|
;;
|
|
scsi|raid)
|
|
echo "Found ($MOD) $DESC"
|
|
GOTHBA=1
|
|
modprobe $MOD
|
|
modprobe sd_mod
|
|
modprobe scsi_mod
|
|
hba=$(($hba + 1))
|
|
;;
|
|
*)
|
|
continue
|
|
;;
|
|
esac
|
|
fi
|
|
done
|
|
if [ -d /proc/device-tree/vdevice/l-lan* ]; then
|
|
modprobe ibmveth
|
|
for i in /sys/bus/vio/drivers/ibmveth/*/net*; do
|
|
udhcpc -i eth$nic -b
|
|
let extrat=0
|
|
until ifconfig eth$nic|grep "inet addr" || [ $extrat == 30 ]; do
|
|
sleep 1
|
|
let extrat=extrat+1
|
|
done
|
|
nic=$(($nic + 1))
|
|
done
|
|
fi
|
|
|
|
if [ -d /proc/device-tree/lhea* ]; then
|
|
modprobe ehea
|
|
for i in /sys/bus/ibmebus/devices/port*; do
|
|
udhcpc -i eth$nic -b
|
|
let extrat=0
|
|
until ifconfig eth$nic|grep "inet addr" || [ $extrat == 30 ]; do
|
|
sleep 1
|
|
let extrat=extrat+1
|
|
done
|
|
nic=$(($nic + 1))
|
|
done
|
|
fi
|
|
|
|
#Give 5 seconds for things to quiesce.
|
|
sleep 5
|