1 |
vip-ire |
1.1 |
diff -Nur e-smith-quota-2.6.0/createlinks e-smith-quota-2.6.0_bz9393/createlinks |
2 |
|
|
--- e-smith-quota-2.6.0/createlinks 2002-08-08 20:05:35.000000000 +0200 |
3 |
|
|
+++ e-smith-quota-2.6.0_bz9393/createlinks 2016-05-12 23:42:31.277876604 +0200 |
4 |
|
|
@@ -1,33 +1,6 @@ |
5 |
|
|
#!/usr/bin/perl -w |
6 |
|
|
|
7 |
|
|
- |
8 |
|
|
-sub safe_symlink { |
9 |
|
|
- my ($from, $to) = @_; |
10 |
|
|
- use File::Basename; |
11 |
|
|
- use File::Path; |
12 |
|
|
- mkpath(dirname($to)); |
13 |
|
|
- unlink($to); |
14 |
|
|
- symlink($from, $to) or die "Can't create symlink from $from to $to: $!"; |
15 |
|
|
-} |
16 |
|
|
- |
17 |
|
|
-sub panel_link |
18 |
|
|
-{ |
19 |
|
|
- my ($function, $panel) = @_; |
20 |
|
|
- |
21 |
|
|
- my $cgibin = "root/etc/e-smith/web/panels/$panel/cgi-bin"; |
22 |
|
|
- |
23 |
|
|
- safe_symlink("../../../functions/$function", |
24 |
|
|
- "$cgibin/$function") |
25 |
|
|
-} |
26 |
|
|
- |
27 |
|
|
-sub event_link |
28 |
|
|
-{ |
29 |
|
|
- my ($action, $event, $level) = @_; |
30 |
|
|
- |
31 |
|
|
- safe_symlink("../actions/${action}", |
32 |
|
|
- "root/etc/e-smith/events/${event}/S${level}${action}"); |
33 |
|
|
-} |
34 |
|
|
-#-------------------------------------------------- |
35 |
|
|
+use esmith::Build::CreateLinks qw(:all); |
36 |
|
|
|
37 |
|
|
foreach (qw( |
38 |
|
|
user-modify |
39 |
|
|
@@ -38,10 +11,5 @@ |
40 |
|
|
event_link("user-modify-quota", $_, "50"); |
41 |
|
|
} |
42 |
|
|
|
43 |
|
|
-#-------------------------------------------------- |
44 |
|
|
-# functions for manager panel |
45 |
|
|
-#-------------------------------------------------- |
46 |
|
|
-my $panel = "manager"; |
47 |
|
|
- |
48 |
|
|
-panel_link("quota", $panel); |
49 |
|
|
+panel_link("quota", "manager"); |
50 |
|
|
|