mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-31 10:06:39 +00:00
Merge pull request #7128 from gurevichmark/xcatroot_bash_link
Improve SLES15 diskless boot
This commit is contained in:
commit
697c207f8d
@ -19,6 +19,11 @@ if [ $? -ne 0 ]; then
|
||||
XCATIPORT="3002"
|
||||
fi
|
||||
|
||||
# On systems with no /bin/bash, create a link to /usr/bin/bash
|
||||
if [ ! -e /bin/bash ] && [ -e /usr/bin/bash ]; then
|
||||
ln -s /usr/bin/bash /bin/bash
|
||||
fi
|
||||
|
||||
xcatdebugmode="$(getarg xcatdebugmode=)"
|
||||
[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER"
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting===================="
|
||||
@ -304,7 +309,8 @@ function getdevfrommac() {
|
||||
|
||||
|
||||
if [ -z $STATEMNT ]; then
|
||||
bootif=$(ls /tmp/net.*.conf|sed -e s/.*net\.// -e s/\.conf//)
|
||||
# get boot interface name and generate network/ifcfg-<name> file
|
||||
bootif=$(ls /tmp/net.*.up|grep -v ":"|sed -e s/.*net\.// -e s/\.up//)
|
||||
cat <<EOF > $NEWROOT/etc/sysconfig/network/ifcfg-$bootif
|
||||
BOOTPROTO='dhcp'
|
||||
STARTMODE='auto'
|
||||
|
@ -2080,9 +2080,9 @@ sub generic_post { # This function is meant to leave the image in a state approx
|
||||
print $cfgfile "# Short-Description: gettyset\n";
|
||||
print $cfgfile "# Description:\n";
|
||||
print $cfgfile "### END INIT INFO\n";
|
||||
print $cfgfile "VERS=`grep VERSION /etc/SuSE-release`\n";
|
||||
print $cfgfile "VERS=`grep VERSION= /etc/os-release`\n";
|
||||
print $cfgfile "if [ -n \"\$VERS\" ]; then\n";
|
||||
print $cfgfile " VERNUM=`echo \$VERS|awk -F= \'{print \$2}\'|sed -e \'s/ //g\'`\n";
|
||||
print $cfgfile " VERNUM=`echo \$VERS|awk -F= \'{print \$2}\'|awk -F- \'{print \$1}\'|sed -e \'s/ //g\'|sed -e \'s/\"//g\'`\n";
|
||||
print $cfgfile "fi\n";
|
||||
print $cfgfile "if [ \"\$VERNUM\" -gt 10 ]; then\n";
|
||||
print $cfgfile " exit\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user