initial commit of file from CVS for smeserver-support on Mon 10 Jul 08:43:33 BST 2023
This commit is contained in:
3
root/etc/e-smith/db/accounts/migrate/php5cgi
Normal file
3
root/etc/e-smith/db/accounts/migrate/php5cgi
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
$_->delete_prop('php5') foreach $DB->ibays();
|
||||
}
|
@@ -0,0 +1 @@
|
||||
enabled
|
@@ -0,0 +1 @@
|
||||
service
|
7
root/etc/e-smith/db/configuration/migrate/20InstallEpoch
Normal file
7
root/etc/e-smith/db/configuration/migrate/20InstallEpoch
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
my $sysconfig = $DB->get('sysconfig')
|
||||
|| $DB->new_record('sysconfig', { type => 'configuration' });
|
||||
|
||||
$sysconfig->prop('InstallEpoch')
|
||||
|| $sysconfig->set_prop('InstallEpoch', time);
|
||||
}
|
11
root/etc/e-smith/db/configuration/migrate/20StatusReport
Normal file
11
root/etc/e-smith/db/configuration/migrate/20StatusReport
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
my $rec = $DB->get('statusreport')
|
||||
|| $DB->new_record('statusreport', { type => 'service' });
|
||||
|
||||
my %props = $rec->props;
|
||||
|
||||
exists $props{DayOfWeek} or $props{DayOfWeek} = int(rand(7));
|
||||
exists $props{Hour} or $props{Hour} = int(rand(24));
|
||||
exists $props{Minute} or $props{Minute} = int(rand(60));
|
||||
$rec->merge_props(%props);
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
{
|
||||
my @add = split(/[,; ]+/, 'CENTOS_EXCLUDES');
|
||||
my %remove = map { $_ => 1 } split(/[,; ]+/, 'CENTOS_REMOVE');
|
||||
|
||||
for my $name ( qw(base updates) )
|
||||
{
|
||||
my $repo = $DB->get($name) or next;
|
||||
|
||||
my @exclude = split(/,/, $repo->prop('Exclude') || '');
|
||||
push @exclude, @add;
|
||||
@exclude = grep(!defined $remove{$_} && !/^CENTOS_/, @exclude);
|
||||
|
||||
# remove duplicates
|
||||
undef %saw;
|
||||
@exclude = grep(!$saw{$_}++, @exclude);
|
||||
|
||||
if ($#exclude >= 0)
|
||||
{
|
||||
$repo->set_prop('Exclude', join(',', @exclude));
|
||||
}
|
||||
else
|
||||
{
|
||||
$repo->delete('Exclude');
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user