--- smeserver-fetchmail-1.3.6/createlinks.createlnks 2008-04-20 06:27:24.000000000 -0600 +++ smeserver-fetchmail-1.3.6/createlinks 2008-04-21 00:44:46.000000000 -0600 @@ -1,35 +1,11 @@ #!/usr/bin/perl -w -# This script creates the symlinks needed by this RPM -# Specific support exists to create symlinks within e-smith web "panels" -# and for links from named "events" directories into the "actions" directory - -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_link -{ - 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}: $!"; -} + +use esmith::Build::CreateLinks qw(:all); #-------------------------------------------------- # functions for manager panel #-------------------------------------------------- my $panel = "manager"; - panel_link("fetchmail", $panel); #-------------------------------------------------- @@ -56,12 +32,6 @@ event_link("fetchmail-email-group-adjust", "fetchmail-change", "30"); event_link("email-assign", "fetchmail-change", "40"); event_link("conf-fetchmail-group-files", "fetchmail-change", "50"); -# that'a a ugly patch to use some new SME features, but to stay -# compatible with SME 6. Probably my last try... -my $eventchange = "root/etc/e-smith/events/fetchmail-change/services2adjust" ; -unlink "$eventchange/masq"; -system("ln -s $eventchange/adjust $eventchange/masq") +safe_symlink("adjust", + "root/etc/e-smith/events/fetchmail-change/services2adjust/masq"); -#-------------------------------------------------- -# The End -#--------------------------------------------------