124 lines
4.0 KiB
Perl
124 lines
4.0 KiB
Perl
#!/usr/bin/perl -w
|
|
|
|
use esmith::Build::CreateLinks qw(:all);
|
|
|
|
my $panel = "manager";
|
|
panel_link("workgroup", $panel);
|
|
|
|
foreach (qw(samba/smb.conf samba/smbusers))
|
|
{
|
|
templates2events("/etc/$_", qw(
|
|
console-save
|
|
bootstrap-console-save
|
|
ibay-create
|
|
ibay-delete
|
|
ibay-modify
|
|
ibay-modify-servers
|
|
network-delete
|
|
network-create
|
|
post-install
|
|
post-upgrade
|
|
workgroup-update
|
|
e-smith-samba-update
|
|
));
|
|
}
|
|
|
|
foreach my $file (qw(
|
|
/etc/pam.d/samba
|
|
/etc/krb5.conf
|
|
))
|
|
{
|
|
templates2events($file, qw(console-save bootstrap-console-save e-smith-samba-update));
|
|
}
|
|
|
|
foreach (qw(console-save bootstrap-console-save bootstrap-ldap-save
|
|
post-install post-upgrade workgroup-update e-smith-samba-update))
|
|
{
|
|
event_link('store-ldap-smbpasswd', $_, "06");
|
|
}
|
|
|
|
my $event = "console-save";
|
|
|
|
$event = "bootstrap-ldap-save";
|
|
templates2events("/etc/samba/smb.conf", $event);
|
|
event_link("update-domain-group-maps", $event, "56");
|
|
|
|
$event = "group-create";
|
|
event_link("update-domain-group-maps", $event, "56");
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "group-delete";
|
|
event_link("update-domain-group-maps", $event, "14");
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "group-modify";
|
|
event_link("update-domain-group-maps", $event, "56");
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "ibay-create";
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "ibay-delete";
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "ibay-modify";
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "ibay-modify-servers";
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "network-create";
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "network-delete";
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "post-install";
|
|
|
|
$event = "post-upgrade";
|
|
event_link("user-create-profiledir", $event, "20");
|
|
|
|
$event = "user-create";
|
|
event_link("user-create-profiledir", $event, "20");
|
|
event_link("update-domain-group-maps", $event, "56");
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "user-delete";
|
|
event_link("update-domain-group-maps", $event, "14");
|
|
event_link("user-delete-profiledir", $event, "20");
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "user-modify";
|
|
event_link("update-domain-group-maps", $event, "56");
|
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "workgroup-update";
|
|
event_link("update-domain-group-maps", $event, "56");
|
|
event_link("cleanup-domains", $event, "65");
|
|
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/dhcpd");
|
|
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/nmbd");
|
|
|
|
$event = "printer-create";
|
|
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "printer-delete";
|
|
event_link("delete_printer_tdb", $event, 15);
|
|
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
|
|
$event = "machine-account-create";
|
|
event_link("create-machine-account", $event, "10");
|
|
|
|
$event = "pre-restore";
|
|
event_link("delete-smbpasswd", $event, "90");
|
|
|
|
$event = "e-smith-samba-update";
|
|
event_link("user-create-profiledir", $event, "20");
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/nmbd");
|
|
# systemd-specific action mandatory for this package-update event
|
|
event_link("systemd-reload", $event, "89");
|
|
event_link("systemd-default", $event, "88");
|
|
templates2events("/etc/rsyslog.conf",$event);
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
|