* Tue Dec 17 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-7.sme
- remove unused template [SME: 12525] - fix action script [SME: 12590]
This commit is contained in:
@@ -37,20 +37,8 @@ if (defined $timezone)
|
||||
}
|
||||
else
|
||||
{
|
||||
# Initialise timezone from /etc/sysconfig/clock if not already set
|
||||
if (open(CLOCK, "/etc/sysconfig/clock"))
|
||||
{
|
||||
while(<CLOCK>)
|
||||
{
|
||||
$timezone = $1 if /^ZONE="(.*)"/;
|
||||
last if defined $timezone;
|
||||
}
|
||||
close(CLOCK) or warn("Could not close CLOCK: $!");
|
||||
}
|
||||
else
|
||||
{
|
||||
warn("Could not open /etc/sysconfig/clock: $!");
|
||||
}
|
||||
# Initialise timezone from timectl if not already set
|
||||
$timezone=`timedatectl 2>/dev/null | grep "zone" | sed -e 's/^[ ]*Time zone: \(.*\) (.*)$/\1/g'`;
|
||||
# If all else fails ...
|
||||
$timezone = "US/Eastern" unless defined $timezone;
|
||||
$db->new_record('TimeZone')->set_value($timezone);
|
||||
@@ -60,7 +48,4 @@ else
|
||||
unlink "/etc/localtime";
|
||||
symlink "../usr/share/zoneinfo/$timezone", "/etc/localtime";
|
||||
|
||||
# Process the template for /etc/sysconfig/clock
|
||||
processTemplate ({TEMPLATE_PATH => "/etc/sysconfig/clock"});
|
||||
|
||||
exit (0);
|
||||
|
Reference in New Issue
Block a user