summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch')
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch b/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch
new file mode 100644
index 000000000..135492d71
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch
@@ -0,0 +1,67 @@
1# Hack in support for an "exclude" config option for the init module, so
2# we can hide certain system services that shouldn't really be configurable
3# via the web interface
4#
5# Upstream-status: Pending
6#
7# Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
8--- webmin-1.570.orig/init/index.cgi
9+++ webmin-1.570/init/index.cgi
10@@ -48,19 +48,20 @@ elsif ($init_mode eq "init" && $access{'
11 : "$config{'init_dir'}/$ac[0]");
12 }
13 @runlevels = &list_runlevels();
14- foreach $r (@runlevels) {
15- foreach $w ("S", "K") {
16- foreach $a (&runlevel_actions($r, $w)) {
17- @ac = split(/\s+/, $a);
18- if (!$nodemap{$ac[2]}) {
19- push(@acts, $ac[1]);
20- push(@actsl,
21- "1+$r+$ac[0]+$ac[1]+$ac[2]+$w");
22- push(@actsf, "$config{'init_base'}/rc$r.d/$w$ac[0]$ac[1]");
23- }
24- }
25- }
26- }
27+ # Assume there won't be any of these broken actions
28+ #foreach $r (@runlevels) {
29+ # foreach $w ("S", "K") {
30+ # foreach $a (&runlevel_actions($r, $w)) {
31+ # @ac = split(/\s+/, $a);
32+ # if (!$nodemap{$ac[2]}) {
33+ # push(@acts, $ac[1]);
34+ # push(@actsl,
35+ # "1+$r+$ac[0]+$ac[1]+$ac[2]+$w");
36+ # push(@actsf, "$config{'init_base'}/rc$r.d/$w$ac[0]$ac[1]");
37+ # }
38+ # }
39+ # }
40+ # }
41
42 # For each action, look at /etc/rc*.d/* files to see if it is
43 # started at boot
44Index: webmin-1.570/init/init-lib.pl
45===================================================================
46--- webmin-1.570.orig/init/init-lib.pl
47+++ webmin-1.570/init/init-lib.pl
48@@ -108,15 +108,17 @@ List boot time action names from init.d,
49 =cut
50 sub list_actions
51 {
52-local($dir, $f, @stbuf, @rv);
53+local($dir, $f, @stbuf, @rv, @exclude);
54 $dir = $config{init_dir};
55+@exclude = split(/,/, $config{exclude});
56 opendir(DIR, $dir);
57 foreach $f (sort { lc($a) cmp lc($b) } readdir(DIR)) {
58 if ($f eq "." || $f eq ".." || $f =~ /\.bak$/ || $f eq "functions" ||
59 $f eq "core" || $f eq "README" || $f eq "rc" || $f eq "rcS" ||
60 -d "$dir/$f" || $f =~ /\.swp$/ || $f eq "skeleton" ||
61 $f =~ /\.lock$/ || $f =~ /\.dpkg-(old|dist)$/ ||
62- $f =~ /^\.depend\./ || $f eq '.legacy-bootordering') { next; }
63+ $f =~ /^\.depend\./ || $f eq '.legacy-bootordering' ||
64+ grep {$_ eq $f} @exclude ) { next; }
65 if (@stbuf = stat("$dir/$f")) {
66 push(@rv, "$f $stbuf[1]");
67 }