mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 11:01:09 +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:
parent
35abe0b9ad
commit
ed94804b90
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user