2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-22 10:22:27 +00:00

Merge pull request #390 from Obihoernchen/fix/profile-installedargs

Fix profile installedargs on Debian, Ubuntu and SUSE 16
This commit is contained in:
Jarrod Johnson
2026-11-17 13:43:20 -05:00
committed by GitHub
6 changed files with 10 additions and 2 deletions
@@ -41,9 +41,11 @@ if [ "$textcons" = "true" ] && ! grep console= /proc/cmdline > /dev/null; then
updategrub=1
fi
fi
kargs=$(python3 /opt/confluent/bin/apiclient /confluent-public/os/$confluent_profile/profile.yaml | grep ^installedargs: | sed -e 's/#.*//')
kargs=$(python3 /opt/confluent/bin/apiclient /confluent-public/os/$confluent_profile/profile.yaml | grep ^installedargs: | sed -e 's/^installedargs:[[:space:]]*//' -e 's/#.*//')
if [ ! -z "$kargs" ]; then
kargs=$(printf '%s' "$kargs" | sed -e 's/[\/&]/\\&/g')
sed -i 's/GRUB_CMDLINE_LINUX="\([^"]*\)"/GRUB_CMDLINE_LINUX="\1 '"${kargs}"'"/' /etc/default/grub
updategrub=1
fi
if [ 1 = $updategrub ]; then
@@ -229,6 +229,7 @@ append=$(grep ^installedargs: /tmp/profile.yaml | sed -e 's/^installedargs: //'
if grep console= /etc/fakecmdline >& /dev/null && [[ "$append" != *console=* ]]; then
append="$append console=${autocons#*/dev/}"
fi
append=$(printf '%s' "$append" | sed -e 's/&/\&amp;/g' -e 's/</\&lt;/g' -e 's/>/\&gt;/g')
if [ -z "$append" ]; then
echo "<bootloader/>" > /tmp/bootloader.xml
else
@@ -46,6 +46,7 @@ sed -i 's@%%ROOTPASSWORD%%@'"$rootpw"'@g' /tmp/autoinstall.json
sed -i s!%%NODENAME%%!$(hostname)!g /tmp/autoinstall.json
python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/profile.yaml > /tmp/instprofile.yaml
blargs=$(grep ^installedargs: /tmp/instprofile.yaml | sed -e 's/#.*//' -e 's/^installedargs: //')
blargs=$(printf '%s' "$blargs" | sed -e 's/[\\"]/\\&/g' -e 's/[\\&!]/\\&/g')
sed -i 's!%%INSTALLEDARGS%%!'"$blargs"'!g' /tmp/autoinstall.json
python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/getinstalldisk > /tmp/getinstalldisk
locale=$(grep ^locale: /etc/confluent/confluent.deploycfg)
@@ -41,9 +41,11 @@ if [ "$textcons" = "true" ] && ! grep console= /proc/cmdline > /dev/null; then
updategrub=1
fi
fi
kargs=$(python3 /opt/confluent/bin/apiclient /confluent-public/os/$confluent_profile/profile.yaml | grep ^installedargs: | sed -e 's/#.*//')
kargs=$(python3 /opt/confluent/bin/apiclient /confluent-public/os/$confluent_profile/profile.yaml | grep ^installedargs: | sed -e 's/^installedargs:[[:space:]]*//' -e 's/#.*//')
if [ ! -z "$kargs" ]; then
kargs=$(printf '%s' "$kargs" | sed -e 's/[\/&]/\\&/g')
sed -i 's/GRUB_CMDLINE_LINUX="\([^"]*\)"/GRUB_CMDLINE_LINUX="\1 '"${kargs}"'"/' /etc/default/grub
updategrub=1
fi
if [ 1 = $updategrub ]; then
@@ -48,6 +48,7 @@ if [ "$textcons" = "true" ] && ! grep console= /proc/cmdline > /dev/null; then
fi
kargs=$(curl https://$confluent_mgr/confluent-public/os/$confluent_profile/profile.yaml | grep ^installedargs: | sed -e 's/^installedargs:[[:space:]]*//' -e 's/#.*//')
if [ ! -z "$kargs" ]; then
kargs=$(printf '%s' "$kargs" | sed -e 's/[\/&]/\\&/g')
sed -i 's/GRUB_CMDLINE_LINUX="\([^"]*\)"/GRUB_CMDLINE_LINUX="\1 '"${kargs}"'"/' /target/etc/default/grub
updategrub=1
fi
@@ -48,6 +48,7 @@ if [ "$textcons" = "true" ] && ! grep console= /proc/cmdline > /dev/null; then
fi
kargs=$(curl https://$confluent_mgr/confluent-public/os/$confluent_profile/profile.yaml | grep ^installedargs: | sed -e 's/^installedargs:[[:space:]]*//' -e 's/#.*//')
if [ ! -z "$kargs" ]; then
kargs=$(printf '%s' "$kargs" | sed -e 's/[\/&]/\\&/g')
sed -i 's/GRUB_CMDLINE_LINUX="\([^"]*\)"/GRUB_CMDLINE_LINUX="\1 '"${kargs}"'"/' /target/etc/default/grub
updategrub=1
fi