initial commit of file from CVS for e-smith-test on Wed 12 Jul 09:10:30 BST 2023

This commit is contained in:
Brian Read
2023-07-12 09:10:30 +01:00
parent 54e4f39dbc
commit b7c1628cf6
18 changed files with 2081 additions and 2 deletions

43
createlinks Executable file
View File

@@ -0,0 +1,43 @@
#!/usr/bin/perl -w
sub safe_symlink {
my ($from, $to) = @_;
use File::Basename;
use File::Path;
mkpath(dirname($to));
unlink($to);
symlink($from, $to) or die "Can't create symlink from $from to $to: $!";
}
sub panel_link
{
my ($function, $panel) = @_;
my $cgibin = "root/etc/e-smith/web/panels/$panel/cgi-bin";
safe_symlink("../../../functions/$function",
"$cgibin/$function")
}
sub event_link
{
my ($action, $event, $level) = @_;
safe_symlink("../actions/${action}",
"root/etc/e-smith/events/${event}/S${level}${action}");
}
#--------------------------------------------------
# actions for post-install event
#--------------------------------------------------
$event = "post-install";
event_link("testing-conf", $event, "90");
#--------------------------------------------------
# actions for post-upgrade event
#--------------------------------------------------
$event = "post-upgrade";
event_link("testing-conf", $event, "90");