added some postscripts to get ready for supporting postbootscripts
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4778 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
2438bdf779
commit
ca4deae18b
@ -219,10 +219,10 @@ if [ $argnum -gt 2 ]; then
|
||||
fi
|
||||
|
||||
#ADDSITEYUM is set by post.rh and post.rh.iscsi for full installtion
|
||||
if [[ "$ADDSITEYUM" = "1" ]]; then
|
||||
TMP=`sed "/postscripts-start-here/ a addsiteyum" /tmp/mypostscript`
|
||||
echo "$TMP" > /tmp/mypostscript
|
||||
fi
|
||||
#if [[ "$ADDSITEYUM" = "1" ]]; then
|
||||
# TMP=`sed "/postscripts-start-here/ a addsiteyum" /tmp/mypostscript`
|
||||
# echo "$TMP" > /tmp/mypostscript
|
||||
#fi
|
||||
|
||||
#MYCONT=`cat /tmp/mypostscript`
|
||||
#echo "$MYCONT"
|
||||
@ -246,6 +246,8 @@ run_ps () {
|
||||
|
||||
" > /tmp/mypostscript
|
||||
echo "$TMP" >> /tmp/mypostscript
|
||||
TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ s/\(.*\)/run_ps \1/;s/run_ps\s*#/#/;s/run_ps\s*$//" /tmp/mypostscript`
|
||||
echo "$TMP" > /tmp/mypostscript
|
||||
|
||||
if [ $argnum -eq 0 ]; then
|
||||
#notify the server that we are done with netbooting
|
||||
|
48
xCAT/postscripts/xcatinstallpost
Normal file
48
xCAT/postscripts/xcatinstallpost
Normal file
@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
#################################################################
|
||||
#
|
||||
# xCAT script for running postboot scripts for full install case.
|
||||
#################################################################
|
||||
|
||||
if [ ! `uname` == Linux ]; then
|
||||
MYDIR=`dirname $0`
|
||||
#exec $MYDIR/xcatdsklspost.aix
|
||||
exit
|
||||
fi
|
||||
let SLI=$RANDOM%10
|
||||
sleep $SLI
|
||||
|
||||
if grep 'rw /rw tmpfs ' /proc/mounts >& /dev/null; then
|
||||
touch /var/lock/subsys/xcatmounts
|
||||
echo '#!/bin/bash' > /etc/rc6.d/K10xcatmounts
|
||||
echo umount -l /ro >> /etc/rc6.d/K10xcatmounts
|
||||
echo umount -l /rw >> /etc/rc6.d/K10xcatmounts
|
||||
chmod 755 /etc/rc6.d/K10xcatmounts
|
||||
ln -sf /etc/rc6.d/K10xcatmounts /etc/rc0.d/K10xcatmounts
|
||||
fi
|
||||
|
||||
|
||||
|
||||
cd /xcatpost;
|
||||
PATH=/xcatpost:$PATH
|
||||
export PATH
|
||||
chmod +x /xcatpost/*;
|
||||
|
||||
if [ -x /usr/bin/openssl ]; then
|
||||
XCATSERVER="$SIP:3001"
|
||||
export XCATSERVER
|
||||
USEOPENSSLFORXCAT=1 #Though this is the only method going forward, flag to allow backward compatibility with 2.2 generated netboot images
|
||||
export USEOPENSSLFORXCAT
|
||||
fi
|
||||
|
||||
|
||||
DHCP_TMP=`sed 's/\(DHCPINTERFACES=\)\(.*\)$/\1"\2"/' /tmp/mypostscript.post`
|
||||
echo "$DHCP_TMP" > /tmp/mypostscript
|
||||
|
||||
echo "updateflag.awk \$MASTER 3002 \"installstatus booted\"" >> /tmp/mypostscript.post
|
||||
|
||||
chmod +x /tmp/mypostscript.post
|
||||
if [ -x /tmp/mypostscript.post ];then
|
||||
/tmp/mypostscript.post
|
||||
fi
|
39
xCAT/postscripts/xcatpostinit1
Normal file
39
xCAT/postscripts/xcatpostinit1
Normal file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
# chkconfig: 345 84 59
|
||||
# description: service node postboot script hack
|
||||
# processname: xcatpostinit
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: xcatpostinit
|
||||
# Default-Start: 3 4 5
|
||||
# Default-stop: 0 1 2 6
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Short-Description: xCATpost
|
||||
# Description: xCAT post boot script
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
if [ -x /etc/rc.d/init.d/functions ]; then
|
||||
. /etc/rc.d/init.d/functions
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
echo -n "xcatpostinit1 runs only at boot, runs additional post scripts"
|
||||
;;
|
||||
stop)
|
||||
echo -n "nothing to stop "
|
||||
;;
|
||||
start)
|
||||
# run /opt/xcat/xcatinstallpost
|
||||
if [ -r /opt/xcat/xcatinstallpost ]; then
|
||||
/opt/xcat/xcatinstallpost
|
||||
fi
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user