#!/usr/bin/perl -w use esmith::Build::CreateLinks qw(:all); # our event specific for updating with yum without reboot $event = "smeserver-nfs-update"; #add here the path to your templates needed to expand #see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event foreach my $file (qw( /etc/systemd/system-preset/49-koozali.preset /etc/exports /etc/hosts.allow )) { templates2events( $file, $event ); } #action needed in case we have a systemd unit event_link("systemd-default", $event, "88"); event_link("systemd-reload", $event, "89"); #action specific to this package #event_link("nfs-update", $event, "60"); #services we need to restart safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/nfs"); #-------------------------------------------------- ## functions for manager panel ##-------------------------------------------------- panel_link("nfsshare", "manager"); foreach (qw(sysconfig/nfs exports hosts.allow)) { templates2events("/etc/$_", qw( console-save bootstrap-console-save remoteaccess-update nfs-update )); } #add this event for change /etc/exports with new local network foreach (qw(exports)) { templates2events("/etc/$_", qw( network-create )); } foreach $event (qw(remoteaccess-update nfs-update network-create)) { safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/nfslock"); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/nfs"); } #The service rpcbind needs to be restarted before nfs service, #but sometime it start before so I had to do a specific action for my $event (qw(remoteaccess-update nfs-update network-create)) { event_link("smeserver-nfs-restart-rpcbind", $event, "05"); } $event="nfs-update"; templates2events("/etc/hosts.allow", $event); #here a specific event only for the server-manager, nfs-update is an event a bit long foreach $event (qw(nfs-conf)) { safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/nfs"); templates2events("/etc/exports", $event); templates2events("/etc/hosts.allow", $event); } #service_link_enhanced("rpcbind", "S13", "7"); #service_link_enhanced("nfslock", "S59", "7"); #service_link_enhanced("nfs", "S60", "7");