/[smeserver]/rpms/e-smith-quota/sme10/e-smith-quota-2.6.0-use_createlinks.patch
ViewVC logotype

Contents of /rpms/e-smith-quota/sme10/e-smith-quota-2.6.0-use_createlinks.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu May 12 21:48:50 2016 UTC (8 years, 5 months ago) by vip-ire
Branch: MAIN
CVS Tags: e-smith-quota-2_6_0-4_el7_sme, e-smith-quota-2_6_0-3_el7_sme, e-smith-quota-2_6_0-5_el7_sme, HEAD
* Thu May 12 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-3.sme
- Use CreateLinks instead of local functions so panel links point on the
  wrapper [SME: 9393]

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

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed