From f4ad4ee896eaafd0c6aaad8aba75fe23a1ce262a Mon Sep 17 00:00:00 2001 From: mxi1 Date: Mon, 16 Feb 2009 07:22:21 +0000 Subject: [PATCH] update xcatdsklspost for SLES11 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2749 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/xcatdsklspost | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index f3f4b0b19..b292e134f 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -13,13 +13,21 @@ fi let SLI=$RANDOM%10 sleep $SLI +#setup $OSVER ,for SLES11 +if [ -e '/etc/SuSE-release' ]; then + OSVER=`grep -h VERSION /etc/SuSE-release |awk '{print $3}'` +fi + 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 #echo "SIP=$SIP" - +if [ $OSVER=='11' ]; then + SIP=`echo $SIP |awk -F\' '{print $2}'` #trim ' +fi + if grep 'rw /rw tmpfs ' /proc/mounts >& /dev/null; then touch /var/lock/subsys/xcatmounts echo '#!/bin/bash' > /etc/rc6.d/K10xcatmounts @@ -32,6 +40,8 @@ fi mkdir -p /etc/stunnel mkdir -p /var/stunnel +mkdir -p /usr/var/run/stunnel #at least for SLES11 + cat > /etc/stunnel/stunnel.conf << EOF client=yes foreground=no @@ -87,6 +97,11 @@ if [ $# -eq 0 ]; then echo "updateflag.awk \$MASTER 3002 \"installstatus booted\"" >> /tmp/mypostscript fi +if [ $OSVER=='11' ]; then #for SLES11 + DHCP_TMP=`sed 's/\(DHCPINTERFACES=\)\(.*\)$/\1"\2"/' /tmp/mypostscript` + echo "$DHCP_TMP" > /tmp/mypostscript +fi + chmod +x /tmp/mypostscript if [ -x /tmp/mypostscript ];then /tmp/mypostscript