From 2245b278fac6d300a10c11556f0a833810118257 Mon Sep 17 00:00:00 2001 From: cxhong Date: Thu, 16 Jan 2020 17:34:27 -0500 Subject: [PATCH] Support otherpkgs as postbootscript for SLE15 --- xCAT-server/share/xcat/install/scripts/post.xcat | 4 ++-- xCAT/postscripts/enablekdump | 4 ++-- xCAT/postscripts/setupntp.traditional | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 32298bb92..0a9e943b5 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -282,7 +282,7 @@ if [ $? -eq 0 ]; then fi if [ $hassystemd -eq 1 ] ; then - if [[ $OSVER == sles12* ]]; then + if [[ $OSVER =~ sle && $OSVER != sles11* ]]; then cat >/etc/systemd/system/xcatpostinit1.service <<'EOF' #INCLUDE:/install/postscripts/xcatpostinit1.service.yast2# EOF @@ -514,7 +514,7 @@ cd / # To skip the conflict, the network service should be stoped in the yast first stage. Then base on the service # dependency, the service start order will be 'YaST2-Second-Stage.service'->'network'->'xcatpostinit1' in serial. # Then the Yast2 will be stopped before running the zypper in otherpkgs. -if [[ $OSVER =~ sles && $OSVER != sles11* ]]; then +if [[ $OSVER =~ sle && $OSVER != sles11* ]]; then service network stop fi diff --git a/xCAT/postscripts/enablekdump b/xCAT/postscripts/enablekdump index 92fd65881..30349eb48 100755 --- a/xCAT/postscripts/enablekdump +++ b/xCAT/postscripts/enablekdump @@ -40,7 +40,7 @@ for i in `/bin/cat /proc/cmdline`; do done if [ ! -z "$MACX" ] && [ ! -z "$ETHX" ]; then - if (pmatch $OSVER "sles*") || (pmatch $OSVER "suse*") || [ -f /etc/SuSE-release ]; then + if (pmatch $OSVER "sle*") || (pmatch $OSVER "suse*") || [ -f /etc/SuSE-release ]; then CONFFILE=$MNTDIR/etc/sysconfig/network/ifcfg-$ETHX fi if (pmatch $OSVER "fedora*") || (pmatch $OSVER "rhel6*") || (pmatch $OSVER "rhels6*") || [ -f /etc/fedora-release ] || [ -f /etc/redhat-release ];then @@ -108,7 +108,7 @@ if [ ! -z "$DUMP" ]; then fi if [ "$KDPROTO" = "nfs" ]; then - if (pmatch $OSVER "sles*") || (pmatch $OSVER "suse*") || [ -f /etc/SuSE-release ]; then + if (pmatch $OSVER "sle*") || (pmatch $OSVER "suse*") || [ -f /etc/SuSE-release ]; then if (pmatch $OSVER "*10*"); then #run mkinitrd to generater the kdump-init base if (pmatch $ARCH "x86*"); then diff --git a/xCAT/postscripts/setupntp.traditional b/xCAT/postscripts/setupntp.traditional index 788f4d191..51fb23e73 100755 --- a/xCAT/postscripts/setupntp.traditional +++ b/xCAT/postscripts/setupntp.traditional @@ -94,7 +94,7 @@ if [ $OS_TYPE = Linux ]; then mkdir -p /var/lib/ntp chown ntp /var/lib/ntp - if ( pmatch $OSVER "sles*" ) || ( pmatch $OSVER "suse*" ) || [ -f /etc/SuSE-release ];then + if ( pmatch $OSVER "sle*" ) || ( pmatch $OSVER "suse*" ) || [ -f /etc/SuSE-release ];then echo "driftfile /var/lib/ntp/drift/ntp.drift" >>$conf_file else echo "driftfile /var/lib/ntp/drift" >>$conf_file @@ -135,7 +135,7 @@ if [ $OS_TYPE = Linux ]; then hwclock --systohc --utc #setup the RTC is UTC format, which will be used by os - if ( pmatch $OSVER "sles*" ) || ( pmatch $OSVER "suse*" ) || [ -f /etc/SuSE-release ];then + if ( pmatch $OSVER "sle*" ) || ( pmatch $OSVER "suse*" ) || [ -f /etc/SuSE-release ];then grep -i -q "HWCLOCK" /etc/sysconfig/clock if [ $? -eq 0 ];then sed -i 's/.*HWCLOCK.*/HWCLOCK=\"-u\"/' /etc/sysconfig/clock