initial commit of file from CVS for e-smith-packetfilter on Wed 12 Jul 09:02:33 BST 2023
This commit is contained in:
46
createlinks
Normal file
46
createlinks
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use esmith::Build::CreateLinks qw(:all);
|
||||
|
||||
templates2events("/etc/ulogd.conf", qw(post-install post-upgrade e-smith-packetfilter-update));
|
||||
|
||||
# conf-masq
|
||||
|
||||
templates2events("/etc/rc.d/init.d/masq", qw(
|
||||
console-save
|
||||
bootstrap-console-save
|
||||
network-create
|
||||
network-delete
|
||||
remoteaccess-update
|
||||
email-update
|
||||
e-smith-packetfilter-update
|
||||
));
|
||||
|
||||
foreach (qw(console-save ip-change network-create network-delete remoteaccess-update e-smith-packetfilter-update))
|
||||
{
|
||||
safe_symlink("reload", "root/etc/e-smith/events/$_/services2adjust/masq");
|
||||
}
|
||||
|
||||
my $event ="e-smith-packetfilter-update";
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ulogd");
|
||||
event_link("systemd-reload", $event, "89");
|
||||
event_link("systemd-default", $event, "88");
|
||||
templates2events("/etc/logrotate.d/ulogd", ($event,qw(post-install post-upgrade bootstrap-console-save)) );
|
||||
|
||||
|
||||
#systemd
|
||||
foreach my $target (qw(multi-user sme-server))
|
||||
{
|
||||
system('mkdir -p root/usr/lib/systemd/system/'.$target.'.target.wants/');
|
||||
|
||||
foreach my $unit (qw(
|
||||
masq.service
|
||||
ulogd.service
|
||||
))
|
||||
{
|
||||
symlink("../$unit",
|
||||
"root/usr/lib/systemd/system/$target.target.wants/$unit")
|
||||
or die "Can't symlink to root/usr/lib/systemd/system/$target.target.wants/$unit: $!";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user