2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 01:22:00 +00:00

Change timezone substitution strategy

This uses a more self-evident breadcrumb to intuitively override
for users not wanting to use the confluent facility for timezone
adjustment.

There are other 'peculiar' substitutions that may prefer a breadcrumb
but they may require structure that would be tricky to implement
while also passing validation.
This commit is contained in:
Jarrod Johnson 2022-11-10 08:57:04 -05:00
parent 35abe0b9ad
commit ed94804b90
7 changed files with 7 additions and 6 deletions

View File

@ -81,6 +81,7 @@ fi
tz=$(grep timezone: /etc/confluent/confluent.deploycfg | awk '{print $2}')
echo "<timezone>${tz}</timezone>" > /tmp/timezone
echo "${tz}" > /tmp/timezone.txt
autoconfigmethod=$(grep ipv4_method /etc/confluent/confluent.deploycfg)
autoconfigmethod=${autoconfigmethod#ipv4_method: }
if [ "$autoconfigmethod" = "dhcp" ]; then

View File

@ -8,7 +8,7 @@ dynamic behavior and replace with static configuration.
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<timezone>
<hwclock>UTC</hwclock>
<!--INSERT:/tmp/timezone-->
<timezone>%%TIMEZONE%%</timezone>
</timezone>
<general>
<self_update config:type="boolean">false</self_update>

View File

@ -8,7 +8,7 @@ dynamic behavior and replace with static configuration.
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<timezone>
<hwclock>UTC</hwclock>
<!--INSERT:/tmp/timezone-->
<timezone>%%TIMEZONE%%</timezone>
</timezone>
<general>
<self_update config:type="boolean">false</self_update>

View File

@ -59,5 +59,5 @@ if grep append /tmp/bootloader.xml > /dev/null; then
sed -i 's@</general>@</general>'"$(tr -d '\n' < /tmp/bootloader.xml)"'@' /tmp/profile/modified.xml
fi
sed -i 's#root</username>#root</username>'"$(tr -d '\n' < /tmp/rootkeys.xml)"'#' /tmp/profile/modified.xml
sed -i 's@/hwclock>@/hwclock>'"$(tr -d '\n' < /tmp/timezone)"'@' /tmp/profile/modified.xml
sed -i 's@%%TIMEZONE%%@'"$(cat /tmp/timezone.txt)"'@' /tmp/profile/modified.xml
sed -i 's@<media_url/>@'"$(tr -d '\n' < /tmp/pkgurl)"'@' /tmp/profile/modified.xml

View File

@ -8,7 +8,7 @@ dynamic behavior and replace with static configuration.
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<timezone>
<hwclock>UTC</hwclock>
<!--INSERT:/tmp/timezone-->
<timezone>%%TIMEZONE%%</timezone>
</timezone>
<general>
<self_update config:type="boolean">false</self_update>

View File

@ -8,7 +8,7 @@ dynamic behavior and replace with static configuration.
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<timezone>
<hwclock>UTC</hwclock>
<!--INSERT:/tmp/timezone-->
<timezone>%%TIMEZONE%%</timezone>
</timezone>
<general>
<self_update config:type="boolean">false</self_update>

View File

@ -59,5 +59,5 @@ if grep append /tmp/bootloader.xml > /dev/null; then
sed -i 's@</general>@</general>'"$(tr -d '\n' < /tmp/bootloader.xml)"'@' /tmp/profile/modified.xml
fi
sed -i 's#root</username>#root</username>'"$(tr -d '\n' < /tmp/rootkeys.xml)"'#' /tmp/profile/modified.xml
sed -i 's@/hwclock>@/hwclock>'"$(tr -d '\n' < /tmp/timezone)"'@' /tmp/profile/modified.xml
sed -i 's@%%TIMEZONE%%@'"$(cat /tmp/timezone.txt)"'@' /tmp/profile/modified.xml
sed -i 's@<media_url/>@'"$(tr -d '\n' < /tmp/pkgurl)"'@' /tmp/profile/modified.xml