initial commit of file from CVS for e-smith-base on Thu 26 Oct 11:24:52 BST 2023

This commit is contained in:
2023-10-26 11:24:52 +01:00
parent bbc22988a8
commit 9510d1a360
678 changed files with 22721 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
{
# Add configuration database entry for TimeZone if there is not one already
return if defined $DB->get('TimeZone');
if (-l "/etc/localtime")
{
# get timezone information from the system /etc/localtime
my $localtime = readlink "/etc/localtime" || "US/Eastern";
# Make a relative link into an absolute one
$localtime =~ s:^\.\.::;
# Extract timezone from absolute path
$localtime =~ s:^/usr/share/zoneinfo/::;
$DB->new_record('TimeZone', {type => $localtime});
}
}