1 |
diff -urN smeserver-smbstatus-1.2.old/createlinks smeserver-smbstatus-1.2/createlinks |
2 |
--- smeserver-smbstatus-1.2.old/createlinks 2006-03-27 20:02:23.000000000 +0100 |
3 |
+++ smeserver-smbstatus-1.2/createlinks 2020-10-14 07:21:09.806632184 +0100 |
4 |
@@ -14,6 +14,15 @@ |
5 |
"/cgi-bin/$function: $!"; |
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 event_link |
18 |
{ |
19 |
my ($action, $event, $level) = @_; |
20 |
@@ -49,3 +58,4 @@ |
21 |
#event_link("action1", $event, "55"); |
22 |
#event_link("action2", $event, "90"); |
23 |
|
24 |
+safe_symlink("/etc/e-smith/web/functions/wrapper","root/etc/e-smith/web/panels/manager/cgi-bin/smbstatus"); |