diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 6cf90fb96..32298bb92 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -43,7 +43,6 @@ chmod 0755 /tmp/updateflag cd /tmp log_label="xcat.deployment" -msgutil_r "$MASTER_IP" "info" "=============deployment starting====================" "/var/log/xcat/xcat.log" "$log_label" msgutil_r "$MASTER_IP" "info" "Executing post.xcat to prepare for firstbooting ..." "/var/log/xcat/xcat.log" "$log_label" RAND=$(perl -e 'print int(rand(50)). "\n"') diff --git a/xCAT-server/share/xcat/install/scripts/pre.rh b/xCAT-server/share/xcat/install/scripts/pre.rh index eedaab849..fd84bb2b8 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.rh +++ b/xCAT-server/share/xcat/install/scripts/pre.rh @@ -2,7 +2,11 @@ export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then set -x fi - +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" if grep n8r /proc/cmdline > /dev/null 2>&1; then stty crtscts @@ -183,7 +187,7 @@ fi #also, find first available block device (sda or vda likely) #TODO: pick a likely non-SAN target if possible shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -204,7 +208,7 @@ else fi BOOTFSTYPE=ext3 EFIFSTYPE=vfat - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" if [ `uname -m` = "ppc64" ]; then echo 'part None --fstype "PPC PReP Boot" --ondisk '$instdisk' --size 8' >> /tmp/partitionfile fi @@ -227,7 +231,7 @@ echo "part / --size 1 --grow --ondisk $instdisk --fstype $FSTYPE" >> /tmp/partit echo "=================The Partition Scheme================" cat /tmp/partitionfile echo "=====================================================" - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" # The following code is to generate the repository for the installation cat /proc/cmdline diff --git a/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 b/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 index 7bea14300..44f1c87c6 100755 --- a/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 +++ b/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 @@ -2,7 +2,11 @@ export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then set -x fi - +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" if grep n8r /proc/cmdline > /dev/null 2>&1; then stty crtscts @@ -38,7 +42,6 @@ sock.close() EOF - cat >/tmp/foo.py <> /tmp/partitionfile if [ `uname -m` = "ppc64" -o `uname -m` = "ppc64le" ]; then echo 'part None --fstype "PPC PReP Boot" --ondisk '$instdisk' --size 8' >> /tmp/partitionfile @@ -218,6 +222,7 @@ cat /tmp/partitionfile echo "=====================================================" # The following code is to generate the repository for the installation +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" cat /proc/cmdline NEXTSERVER=`cat /proc/cmdline | grep http | head -n 1` diff --git a/xCAT-server/share/xcat/install/scripts/pre.rhels8 b/xCAT-server/share/xcat/install/scripts/pre.rhels8 index eb50301b4..92ad09f34 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.rhels8 +++ b/xCAT-server/share/xcat/install/scripts/pre.rhels8 @@ -5,7 +5,11 @@ case "$XCATDEBUGMODE" in set -x ;; esac - +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" if grep -q n8r /proc/cmdline >/dev/null 2>&1 then stty crtscts @@ -148,7 +152,7 @@ esac # also, find first available block device (sda or vda likely) # TODO: pick a likely non-SAN target if possible shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -162,7 +166,7 @@ fi BOOTFSTYPE=ext4 FSTYPE=ext4 EFIFSTYPE=efi - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" echo "ignoredisk --only-use=$instdisk" >>/tmp/partitionfile case "$(uname -m)" in "ppc64"|"ppc64le") @@ -210,7 +214,7 @@ fi echo "================ The Partition Scheme ===============" cat /tmp/partitionfile echo "=====================================================" - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" # The following code is to generate the repository for the installation cat /proc/cmdline diff --git a/xCAT-server/share/xcat/install/scripts/pre.sle15 b/xCAT-server/share/xcat/install/scripts/pre.sle15 index 127742a60..733fbe66b 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.sle15 +++ b/xCAT-server/share/xcat/install/scripts/pre.sle15 @@ -9,6 +9,11 @@ #!/bin/sh { +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running AutoYaST Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" echo "Running AutoYaST Pre-Installation script..." export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" @@ -119,7 +124,7 @@ fi /tmp/foo.awk >/tmp/foo.log 2>&1 & shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -129,7 +134,7 @@ if [ -e "/tmp/xcat.install_disk" ]; then instdisk=`cat /tmp/xcat.install_disk` fi - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" if [ -d /sys/firmware/efi ]; then sed -e 's!XCATPARTITIONHOOK!'$instdisk'vfat/boot/efi128mbswapauto/auto!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml else @@ -147,7 +152,7 @@ if [ -r "/tmp/partitionfile" ]; then sed -e '//{N;N;s!.*!'$con'!}' /tmp/profile/autoinst.xml > /tmp/profile/modified1.xml sed -e 's!xcattempspace! !g' /tmp/profile/modified1.xml > /tmp/profile/modified.xml fi - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" export nextserver=`cat /proc/cmdline | grep http | awk -F'autoyast=http://' {'print \$2'} | awk -F':' {'print \$1'}` cp /tmp/profile/modified.xml /tmp/profile/modified1.xml sed -e 's!XCATNEXTSERVERHOOK!'$nextserver'!' /tmp/profile/modified1.xml > /tmp/profile/modified.xml diff --git a/xCAT-server/share/xcat/install/scripts/pre.sles b/xCAT-server/share/xcat/install/scripts/pre.sles index 94c414560..5ddc37786 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.sles +++ b/xCAT-server/share/xcat/install/scripts/pre.sles @@ -9,6 +9,11 @@ #!/bin/sh { +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running AutoYaST Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" echo "Running AutoYaST Pre-Installation script..." export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" @@ -119,7 +124,7 @@ fi /tmp/foo.awk >/tmp/foo.log 2>&1 & shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -129,7 +134,7 @@ if [ -e "/tmp/xcat.install_disk" ]; then instdisk=`cat /tmp/xcat.install_disk` fi - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" if [ -d /sys/firmware/efi ]; then sed -e 's!XCATPARTITIONHOOK!'$instdisk'vfat/boot/efi128mbswapauto/auto!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml else @@ -147,7 +152,7 @@ if [ -r "/tmp/partitionfile" ]; then sed -e '//{N;N;s!.*!'$con'!}' /tmp/profile/autoinst.xml > /tmp/profile/modified1.xml sed -e 's!xcattempspace! !g' /tmp/profile/modified1.xml > /tmp/profile/modified.xml fi - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" export nextserver=`cat /proc/cmdline | grep http | awk -F'autoyast=http://' {'print \$2'} | awk -F':' {'print \$1'}` cp /tmp/profile/modified.xml /tmp/profile/modified1.xml sed -e 's!!#INSTALL_SOURCES_IN_PRE#!' /tmp/profile/modified1.xml > /tmp/profile/modified.xml diff --git a/xCAT-server/share/xcat/install/scripts/pre.ubuntu b/xCAT-server/share/xcat/install/scripts/pre.ubuntu index 2a64b2ae8..f528eec91 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/pre.ubuntu @@ -5,11 +5,11 @@ fi #!/bin/sh -if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then - killall syslogd - syslogd -R #XCATVAR:XCATMASTER# -fi - +killall syslogd +syslogd -R #XCATVAR:XCATMASTER# +log_label="xcat.deployment" +logger -t $log_label -p "info" "============deployment starting============" +logger -t $log_label -p "info" "Running preseeding early_command Installation script..." if [ ! -c /dev/vcs ]; then mknod /dev/vcs c 7 0 fi @@ -187,7 +187,7 @@ base64decode() ))}\\x\${h$(( o2 / 16 ))}\${h$(( o2 % 16 ))}\"" done } - +logger -t $log_label -p "info" "Generate partition file..." if [ -d /sys/firmware/efi ]; then echo "ubuntu-efi ::" > /tmp/partitionfile echo " 512 512 1024 fat16" >> /tmp/partitionfile diff --git a/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 b/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 index b410b181f..84141c10b 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 +++ b/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 @@ -5,11 +5,10 @@ fi #!/bin/sh -if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then - killall syslogd - syslogd -R #XCATVAR:XCATMASTER# -fi - +killall syslogd +syslogd -R #XCATVAR:XCATMASTER# +logger -t $log_label -p "info" "============deployment starting============" +logger -t $log_label -p "info" "Running preseeding early_command Installation script..." if [ ! -c /dev/vcs ]; then mknod /dev/vcs c 7 0 fi @@ -201,7 +200,7 @@ base64decode() ))}\\x\${h$(( o2 / 16 ))}\${h$(( o2 % 16 ))}\"" done } - +logger -t $log_label -p "info" "Generate partition file..." if [ -d /sys/firmware/efi ]; then echo "ubuntu-efi ::" > /tmp/partitionfile echo " 512 512 1024 fat16" >> /tmp/partitionfile