1 |
diff -Nur e-smith-qmailanalog-2.6.0/createlinks e-smith-qmailanalog-2.6.0_bz9393/createlinks |
2 |
--- e-smith-qmailanalog-2.6.0/createlinks 2002-04-11 21:56:25.000000000 +0200 |
3 |
+++ e-smith-qmailanalog-2.6.0_bz9393/createlinks 2016-05-12 23:52:51.809970404 +0200 |
4 |
@@ -1,50 +1,5 @@ |
5 |
#!/usr/bin/perl -w |
6 |
-# This script creates the symlinks needed by this RPM |
7 |
-# Specific support exists to create symlinks within e-smith web "panels" |
8 |
-# and for links from named "events" directories into the "actions" directory |
9 |
+use esmith::Build::CreateLinks qw(:all); |
10 |
|
11 |
-sub panel_link |
12 |
-{ |
13 |
- my ($function, $panel) = @_; |
14 |
- |
15 |
- unlink "root/etc/e-smith/web/panels/$panel/cgi-bin/$function"; |
16 |
- symlink("../../../functions/$function", |
17 |
- "root/etc/e-smith/web/panels/$panel/cgi-bin/$function") |
18 |
- or die "Can't symlink to root/etc/e-smith/web/panels/$panel". |
19 |
- "/cgi-bin/$function: $!"; |
20 |
-} |
21 |
- |
22 |
-sub event_link |
23 |
-{ |
24 |
- my ($action, $event, $level) = @_; |
25 |
- |
26 |
- unlink "root/etc/e-smith/events/${event}/S${level}${action}"; |
27 |
- symlink("../actions/${action}", |
28 |
- "root/etc/e-smith/events/${event}/S${level}${action}") |
29 |
- or die "Can't symlink to " . |
30 |
- "root/etc/e-smith/events/${event}/S${level}${action}: $!"; |
31 |
-} |
32 |
- |
33 |
-#-------------------------------------------------- |
34 |
-# functions for manager panel |
35 |
-#-------------------------------------------------- |
36 |
-my $panel = "manager"; |
37 |
- |
38 |
-panel_link("qmailanalog", $panel); |
39 |
- |
40 |
-#-------------------------------------------------- |
41 |
-# actions for console-save event: |
42 |
-#-------------------------------------------------- |
43 |
-$event = "console-save"; |
44 |
- |
45 |
-#event_link("action1", $event, "55"); |
46 |
-#event_link("action2", $event, "60"); |
47 |
- |
48 |
-#-------------------------------------------------- |
49 |
-# actions for domain-create event: |
50 |
-#-------------------------------------------------- |
51 |
-$event = "domain-create"; |
52 |
- |
53 |
-#event_link("action1", $event, "55"); |
54 |
-#event_link("action2", $event, "90"); |
55 |
+panel_link("qmailanalog", "manager"); |
56 |
|