diff --git a/xCAT-server-2.0/share/xcat/install/scripts/post.rh b/xCAT-server-2.0/share/xcat/install/scripts/post.rh index 806e358a5..a1fcb2103 100644 --- a/xCAT-server-2.0/share/xcat/install/scripts/post.rh +++ b/xCAT-server-2.0/share/xcat/install/scripts/post.rh @@ -86,6 +86,8 @@ export NODE=#TABLE:nodelist:THISNODE:node# export OSVER=#TABLE:nodetype:THISNODE:os# export ARCH=#TABLE:nodetype:THISNODE:arch# addsiteyum +sed -i 's/^serial/#serial/' /boot/grub/menu.lst +sed -i 's/^terminal/#terminal/' /boot/grub/menu.lst updateflag.awk $MASTER 3002 cd / rm -Rf /xcatpost diff --git a/xCAT-server-2.0/share/xcat/install/scripts/post.rh.iscsi b/xCAT-server-2.0/share/xcat/install/scripts/post.rh.iscsi index 385d98a8e..df89c0d5e 100644 --- a/xCAT-server-2.0/share/xcat/install/scripts/post.rh.iscsi +++ b/xCAT-server-2.0/share/xcat/install/scripts/post.rh.iscsi @@ -85,6 +85,8 @@ export OSVER=#TABLE:nodetype:THISNODE:os# export ARCH=#TABLE:nodetype:THISNODE:arch# addsiteyum iscsiadm -m discovery -t st -p #TABLE:iscsi:$NODE:server# +sed -i 's/^serial/#serial/' /boot/grub/menu.lst +sed -i 's/^terminal/#terminal/' /boot/grub/menu.lst uploadboot cd / rm -Rf /xcatpost diff --git a/xCAT-server-2.0/share/xcat/netboot/sles/compute.pkglist b/xCAT-server-2.0/share/xcat/netboot/sles/compute.pkglist index 2a2758dd4..81d94dedc 100644 --- a/xCAT-server-2.0/share/xcat/netboot/sles/compute.pkglist +++ b/xCAT-server-2.0/share/xcat/netboot/sles/compute.pkglist @@ -4,5 +4,7 @@ stunnel dhcpcd kernel-smp openssh -busybox +procps +psmisc +resmgr wget diff --git a/xCAT-server-2.0/share/xcat/netboot/sles/genimage b/xCAT-server-2.0/share/xcat/netboot/sles/genimage index 7aeb1d470..cca9f83da 100755 --- a/xCAT-server-2.0/share/xcat/netboot/sles/genimage +++ b/xCAT-server-2.0/share/xcat/netboot/sles/genimage @@ -180,7 +180,7 @@ sub mkinitrd { mkpath("/tmp/xcatinitrd.$$/dev/mapper"); mkpath("/tmp/xcatinitrd.$$/sysroot"); mkpath("/tmp/xcatinitrd.$$/etc/ld.so.conf.d"); - mkpath("/tmp/xcatinitrd.$$/var/lib/dhclient"); + mkpath("/tmp/xcatinitrd.$$/var/lib/dhcpcd"); my $inifile; open($inifile,">","/tmp/xcatinitrd.$$/init"); print $inifile "#!/bin/bash\n"; @@ -260,15 +260,12 @@ if [ "\$NFS" = "1" ]; then done mount -t tmpfs rw /rw mkdir -p /rw/etc - mkdir -p /rw/var/lib/dhclient - cp /etc/resolv.conf /rw/etc/ - cp /var/lib/dhclient/dhclient.leases /rw/var/lib/dhclient/dhclient-$prinic.leases + mkdir -p /rw/var/lib/dhcpcd mount -t aufs -o dirs=/rw:/ro mergedroot /sysroot mkdir -p /sysroot/ro mkdir -p /sysroot/rw mount --move /ro /sysroot/ro mount --move /rw /sysroot/rw - cp /etc/resolv.conf /sysroot/etc/ elif [ -r /rootimg.sfs ]; then echo Setting up squashfs with ram overlay. mknod /dev/loop0 b 7 0 @@ -320,8 +317,8 @@ EOMS print $inifile " exit\n"; print $inifile "fi\n"; print $inifile "cd /\n"; - print $inifile "cp /var/lib/dhclient/dhclient.leases /sysroot/dev/.dhclient-$prinic.leases\n"; - print $inifile "cp /var/lib/dhclient/dhclient.leases /sysroot/var/lib/dhclient/dhclient-$prinic.leases\n"; + print $inifile "cp /var/lib/dhcpcd/* /sysroot/var/lib/dhcpcd/\n"; + print $inifile "cp /etc/resolv.conf /sysroot/etc/\n"; print $inifile "mknod /sysroot/dev/console c 5 1\n"; print $inifile "exec /lib/mkinitrd/bin/run-init -c /dev/console /sysroot /sbin/init\n"; close($inifile); @@ -337,7 +334,7 @@ EOMS push @filestoadd,[$_,"lib/$_"]; } } - foreach ("bin/cpio","bin/sleep","usr/bin/strace","bin/mount","sbin/dhcpcd","bin/bash","sbin/insmod","bin/mkdir","bin/mknod","sbin/ip","bin/cat","usr/bin/awk","usr/bin/wget","bin/cp","usr/bin/cpio","usr/bin/zcat","lib/mkinitrd/bin/run-init") { + foreach ("bin/cpio","bin/sleep","bin/mount","sbin/dhcpcd","bin/bash","sbin/insmod","bin/mkdir","bin/mknod","sbin/ip","bin/cat","usr/bin/awk","usr/bin/wget","bin/cp","usr/bin/cpio","usr/bin/zcat","lib/mkinitrd/bin/run-init") { getlibs($_); push @filestoadd,$_; } diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 6bca3e78c..6ff047eef 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -15,6 +15,11 @@ let SLI=$RANDOM%10 sleep $SLI SIP=`grep -h dhcp-server-identifier /var/lib/dhclient/dhclient-*.leases|tail -n 1|awk '{print $3}'|sed -e 's/;//'` +if [ -z "$SIP" ]; then + SIP=`grep -h DHCPSID /var/lib/dhcpcd/*.info|awk -F= '{print $2}'|tail -n 1` +fi + + if grep 'rw /rw tmpfs ' /proc/mounts >& /dev/null; then touch /var/lock/subsys/xcatmounts echo '#!/bin/bash' > /etc/rc6.d/K10xcatmounts @@ -26,6 +31,7 @@ fi mkdir -p /etc/stunnel +mkdir -p /var/stunnel cat > /etc/stunnel/stunnel.conf << EOF client=yes foreground=no