mirror of
https://github.com/xcat2/confluent.git
synced 2026-06-15 08:10:44 +00:00
Fix sed invocation with slashes in the value
This commit is contained in:
@@ -16,7 +16,6 @@ systemctl restart sshd > $serialcons 2>&1
|
||||
profile=$(grep ^profile: /etc/confluent/confluent.deploycfg|awk '{print $2}')
|
||||
python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/autoinstall.json > /tmp/autoinstall.json 2> $serialcons
|
||||
sed -i s/%%ROOTPASSWORD%%/$(grep ^rootpassword: /etc/confluent/confluent.deploycfg|awk '{print $2}')/g /tmp/autoinstall.json
|
||||
sed -i s/%%TIMEZONE%%/$(grep ^timezone: /etc/confluent/confluent.deploycfg|awk '{print $2}')/g /tmp/autoinstall.json
|
||||
sed -i s/%%NODENAME%%/$(hostname)/g /tmp/autoinstall.json
|
||||
python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/getinstalldisk > /tmp/getinstalldisk 2> $serialcons
|
||||
python3 /tmp/getinstalldisk > $serialcons 2>&1
|
||||
@@ -26,14 +25,14 @@ if [ -z "$installdisk" ]; then
|
||||
sleep inf
|
||||
fi
|
||||
echo "Installing to $installdisk" > $serialcons
|
||||
sed -i s/%%DISK%%/$installdisk/g /tmp/autoinstall.json
|
||||
sed -i 's!%%INSTALLDISK%%!'$installdisk'!g' /tmp/autoinstall.json
|
||||
locale=$(grep ^locale: /etc/confluent/confluent.deploycfg)
|
||||
locale=${locale#locale: }
|
||||
keymap=$(grep ^keymap: /etc/confluent/confluent.deploycfg)
|
||||
keymap=${keymap#keymap: }
|
||||
tz=$(grep ^timezone: /etc/confluent/confluent.deploycfg)
|
||||
tz=${tz#timezone: }
|
||||
sed -i s/%%TIMEZONE%%/$tz/g /tmp/autoinstall.json
|
||||
sed -i 's!%%TIMEZONE%%/'$tz'!g' /tmp/autoinstall.json
|
||||
sed -i s/%%LOCALE%%/$locale/g /tmp/autoinstall.json
|
||||
sed -i s/%%KEYMAP%%/$keymap/g /tmp/autoinstall.json
|
||||
agama config load /tmp/autoinstall.json > $serialcons 2>&1
|
||||
|
||||
Reference in New Issue
Block a user