move xcatdsklspost from gettyset to xcatpostinit on redhat,
will do the samething later git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6740 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
ce0393fcb3
commit
a6d8825046
@ -1274,7 +1274,7 @@ sub generic_post { #This function is meant to leave the image in a state approxi
|
||||
|
||||
# gettyset is not found on s390x
|
||||
if ($arch ne "s390x") {
|
||||
open($cfgfile,">","$rootimg_dir/etc/rc3.d/S60gettyset");
|
||||
open($cfgfile,">","$rootimg_dir/etc/init.d/gettyset");
|
||||
print $cfgfile "#!/bin/bash\n";
|
||||
print $cfgfile "for i in `cat /proc/cmdline`; do\n";
|
||||
print $cfgfile ' KEY=`echo $i|cut -d= -f 1`'."\n";
|
||||
@ -1293,17 +1293,14 @@ sub generic_post { #This function is meant to leave the image in a state approxi
|
||||
print $cfgfile " fi\n";
|
||||
print $cfgfile " fi\n";
|
||||
print $cfgfile "done\n";
|
||||
chmod(0755,"$rootimg_dir/etc/rc3.d/S60gettyset");
|
||||
close $cfgfile;
|
||||
|
||||
chmod(0755,"$rootimg_dir/etc/init.d/gettyset");
|
||||
link "$rootimg_dir/etc/init.d/gettyset", "$rootimg_dir/etc/rc3.d/S60gettyset";
|
||||
|
||||
#link("$rootimg_dir/sbin/init","$rootimg_dir/init");
|
||||
#add postscript support for redhat
|
||||
if($mode eq "statelite") {
|
||||
print $cfgfile "/opt/xcat/xcatdsklspost 4\n";
|
||||
} else {
|
||||
print $cfgfile "/opt/xcat/xcatdsklspost\n";
|
||||
}
|
||||
|
||||
close($cfgfile);
|
||||
copy("$installroot/postscripts/xcatpostinit", "$rootimg_dir/etc/init.d/xcatpostinit");
|
||||
chmod(0755, "$rootimg_dir/etc/init.d/xcatpostinit");
|
||||
link "$rootimg_dir/etc/init.d/xcatpostinit", "$rootimg_dir/etc/rc3.d/S61xcatpostinit";
|
||||
}
|
||||
|
||||
copy(<$rootimg_dir/boot/vmlinuz*>,"$destdir/kernel"); }
|
||||
|
@ -34,9 +34,35 @@ stop)
|
||||
logger -t xcat "nothing to stop"
|
||||
;;
|
||||
start)
|
||||
# run /opt/xcat/xcatdsklspost
|
||||
if [ -r /opt/xcat/xcatdsklspost ]; then
|
||||
/opt/xcat/xcatdsklspost
|
||||
fi
|
||||
# Node is stateless by default
|
||||
STATELITE="No"
|
||||
|
||||
# Node is statelite if /proc/cmdline have flag `STATEMNT='
|
||||
STATELITE_FLAG="STATEMNT="
|
||||
|
||||
# Script to direct further actions
|
||||
SCRIPT="/opt/xcat/xcatdsklspost"
|
||||
|
||||
# Usefull information passed as kernel arguments
|
||||
if [ -f "/proc/cmdline" ]; then
|
||||
if grep --quiet --no-messages "$STATELITE_FLAG" "/proc/cmdline"; then
|
||||
STATELITE="Yes"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test for script existance
|
||||
if ! [ -x "$SCRIPT" ]; then
|
||||
msg "can't locate executable $SCRIPT"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Run $SCRIPT according to node type
|
||||
if [ -n "$STATELITE" -a -z "${STATELITE/[yY][eE][sS]/}" ]; then
|
||||
logger -t xCAT "Call $SCRIPT for statelite mode"
|
||||
"$SCRIPT" 4
|
||||
else
|
||||
logger -t xCAT "Call $SCRIPT for stateless mode"
|
||||
"$SCRIPT"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user