initial commit of file from CVS for e-smith-runit on Wed 12 Jul 09:08:56 BST 2023
This commit is contained in:
35
createlinks
Executable file
35
createlinks
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/perl -w
|
||||
use esmith::Build::CreateLinks qw(:all);
|
||||
sub panel_link
|
||||
{
|
||||
my ($function, $panel) = @_;
|
||||
|
||||
unlink "root/etc/e-smith/web/panels/$panel/cgi-bin/$function";
|
||||
symlink("../../../functions/$function",
|
||||
"root/etc/e-smith/web/panels/$panel/cgi-bin/$function")
|
||||
or die "Can't symlink to root/etc/e-smith/web/panels/$panel".
|
||||
"/cgi-bin/$function: $!";
|
||||
}
|
||||
|
||||
sub event_link2
|
||||
{
|
||||
my ($action, $event, $level) = @_;
|
||||
|
||||
unlink "root/etc/e-smith/events/${event}/S${level}${action}";
|
||||
symlink("../actions/${action}",
|
||||
"root/etc/e-smith/events/${event}/S${level}${action}")
|
||||
or die "Can't symlink to root/etc/e-smith/events/${event}/S${level}${action}:".
|
||||
" $!";
|
||||
}
|
||||
|
||||
foreach my $target (qw(basic))
|
||||
{
|
||||
system('mkdir -p root/usr/lib/systemd/system/'.$target.'.target.wants/');
|
||||
symlink("../runit.service",
|
||||
"root/usr/lib/systemd/system/$target.target.wants/runit.service")
|
||||
or die "Can't symlink to root/usr/lib/systemd/system/$target.target.wants/runit.service: $!";
|
||||
}
|
||||
my $event="e-smith-runit-update";
|
||||
event_link("systemd-reload", $event, "89");
|
||||
event_link("systemd-default", $event, "88");
|
||||
safe_symlink("start", "root/etc/e-smith/events/$event/services2adjust/runit");
|
Reference in New Issue
Block a user