mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 09:36:41 +00:00
parent
a47c14523b
commit
3b5fd8582e
@ -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"')
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 <<EOF
|
||||
#!/usr/bin/python
|
||||
|
||||
@ -148,6 +151,7 @@ fi
|
||||
#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
|
||||
@ -174,7 +178,7 @@ if uname -r|grep -q '^3.*el7'; then
|
||||
FSTYPE=xfs
|
||||
EFIFSTYPE=efi
|
||||
fi
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
echo "ignoredisk --only-use=$instdisk" >> /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`
|
||||
|
@ -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
|
||||
|
||||
|
@ -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!<device>XCATPARTITIONHOOK</device>!<device>'$instdisk'</device><partitions config:type="list"><partition><filesystem config:type="symbol">vfat</filesystem><mount>/boot/efi</mount><size>128mb</size></partition><partition><mount>swap</mount><size>auto</size></partition><partition><mount>/</mount><size>auto</size></partition></partitions>!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml
|
||||
else
|
||||
@ -147,7 +152,7 @@ if [ -r "/tmp/partitionfile" ]; then
|
||||
sed -e '/<drive>/{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
|
||||
|
@ -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!<device>XCATPARTITIONHOOK</device>!<device>'$instdisk'</device><partitions config:type="list"><partition><filesystem config:type="symbol">vfat</filesystem><mount>/boot/efi</mount><size>128mb</size></partition><partition><mount>swap</mount><size>auto</size></partition><partition><mount>/</mount><size>auto</size></partition></partitions>!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml
|
||||
else
|
||||
@ -147,7 +152,7 @@ if [ -r "/tmp/partitionfile" ]; then
|
||||
sed -e '/<drive>/{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!<software>!<add-on><add_on_products config:type="list">#INSTALL_SOURCES_IN_PRE#</add_on_products></add-on><software>!' /tmp/profile/modified1.xml > /tmp/profile/modified.xml
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user