update xcatdsklspost for SLES11
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2749 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
90f4e81106
commit
f4ad4ee896
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user