diff -Nur e-smith-quota-2.6.0/createlinks e-smith-quota-2.6.0_bz9393/createlinks --- e-smith-quota-2.6.0/createlinks 2002-08-08 20:05:35.000000000 +0200 +++ e-smith-quota-2.6.0_bz9393/createlinks 2016-05-12 23:42:31.277876604 +0200 @@ -1,33 +1,6 @@ #!/usr/bin/perl -w - -sub safe_symlink { - my ($from, $to) = @_; - use File::Basename; - use File::Path; - mkpath(dirname($to)); - unlink($to); - symlink($from, $to) or die "Can't create symlink from $from to $to: $!"; -} - -sub panel_link -{ - my ($function, $panel) = @_; - - my $cgibin = "root/etc/e-smith/web/panels/$panel/cgi-bin"; - - safe_symlink("../../../functions/$function", - "$cgibin/$function") -} - -sub event_link -{ - my ($action, $event, $level) = @_; - - safe_symlink("../actions/${action}", - "root/etc/e-smith/events/${event}/S${level}${action}"); -} -#-------------------------------------------------- +use esmith::Build::CreateLinks qw(:all); foreach (qw( user-modify @@ -38,10 +11,5 @@ event_link("user-modify-quota", $_, "50"); } -#-------------------------------------------------- -# functions for manager panel -#-------------------------------------------------- -my $panel = "manager"; - -panel_link("quota", $panel); +panel_link("quota", "manager");