b271ec7039
-Save the singular set of kernel/initrd/command line arguments when switching away from iscsi to, say, shell -Add implicit imgserver to destiny, assume the management node if nothing else specified -Reorder tftp boot directory hosting iscsi bootstrap, avoid race condition -Change wcons to a perl script in preparation for more sophisticated operation/syntax -Schema changes to iscsi table, place the vlan column after port to reflect relative importance to user git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@420 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
29 lines
1.2 KiB
Bash
Executable File
29 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
if [ -r /boot/etc/yaboot.conf ]; then
|
|
KNAME=`grep ^image /boot/etc/yaboot.conf|head -n 1|cut -d= -f 2|sed -e 's!^/!!'`
|
|
KERNEL=/boot/$KNAME
|
|
KERNEL=`echo $KERNEL|sed -e 's!//!/!g'`
|
|
INAME=`grep initrd /boot/etc/yaboot.conf|head -n 1|cut -d= -f 2|sed -e 's!^/!!'`
|
|
INITRD=/boot/$INAME
|
|
INITRD=`echo $INITRD|sed -e 's!//!/!g'`
|
|
KCMDLINE=`grep append= /boot/etc/yaboot.conf|head -n 1|cut -d= -f 2-`
|
|
KCMDLINE=`echo $KCMDLINE|sed -e 's! rhgb!!'|sed -e 's!"!!g'`
|
|
elif [ -r /boot/grub/menu.lst ]; then
|
|
KNAME=`grep -v ^# /boot/grub/menu.lst|grep -v title|grep kernel|cut -d' ' -f 2|sed -e 's!/boot/!!'`
|
|
KERNEL=/boot/$KNAME
|
|
KCMDLINE=`grep -v ^# /boot/grub/menu.lst|grep -v title|grep kernel|cut -d' ' -f 3-|sed -e 's! rhgb!!'`
|
|
INAME=`grep -v ^# /boot/grub/menu.lst|grep -v title|grep initrd|cut -d' ' -f 2|sed -e 's!/boot/!!'`
|
|
INITRD=/boot/$INAME
|
|
INITRD=`echo $INITRD|sed -e 's!//!/!g'`
|
|
|
|
fi
|
|
mkdir /servboot
|
|
`dirname $0`/unlocktftpdir.awk $MASTER 3002
|
|
mount -o nolock $MASTER:/tftpboot/xcat/$NODE /servboot
|
|
cp $KERNEL /servboot/$KNAME
|
|
cp $INITRD /servboot/$INAME
|
|
umount /servboot
|
|
`dirname $0`/locktftpdir.awk $MASTER 3002
|
|
rmdir /servboot
|
|
`dirname $0`/setiscsiparms.awk $MASTER 3002 $KNAME $INAME "$KCMDLINE"
|