diff options
Diffstat (limited to 'recipes-extended/webmin')
-rw-r--r-- | recipes-extended/webmin/files/init-exclude.patch | 67 | ||||
-rw-r--r-- | recipes-extended/webmin/webmin_1.570.bb | 6 |
2 files changed, 71 insertions, 2 deletions
diff --git a/recipes-extended/webmin/files/init-exclude.patch b/recipes-extended/webmin/files/init-exclude.patch new file mode 100644 index 0000000..135492d --- /dev/null +++ b/recipes-extended/webmin/files/init-exclude.patch @@ -0,0 +1,67 @@ +# Hack in support for an "exclude" config option for the init module, so +# we can hide certain system services that shouldn't really be configurable +# via the web interface +# +# Upstream-status: Pending +# +# Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> +--- webmin-1.570.orig/init/index.cgi ++++ webmin-1.570/init/index.cgi +@@ -48,19 +48,20 @@ elsif ($init_mode eq "init" && $access{' + : "$config{'init_dir'}/$ac[0]"); + } + @runlevels = &list_runlevels(); +- foreach $r (@runlevels) { +- foreach $w ("S", "K") { +- foreach $a (&runlevel_actions($r, $w)) { +- @ac = split(/\s+/, $a); +- if (!$nodemap{$ac[2]}) { +- push(@acts, $ac[1]); +- push(@actsl, +- "1+$r+$ac[0]+$ac[1]+$ac[2]+$w"); +- push(@actsf, "$config{'init_base'}/rc$r.d/$w$ac[0]$ac[1]"); +- } +- } +- } +- } ++ # Assume there won't be any of these broken actions ++ #foreach $r (@runlevels) { ++ # foreach $w ("S", "K") { ++ # foreach $a (&runlevel_actions($r, $w)) { ++ # @ac = split(/\s+/, $a); ++ # if (!$nodemap{$ac[2]}) { ++ # push(@acts, $ac[1]); ++ # push(@actsl, ++ # "1+$r+$ac[0]+$ac[1]+$ac[2]+$w"); ++ # push(@actsf, "$config{'init_base'}/rc$r.d/$w$ac[0]$ac[1]"); ++ # } ++ # } ++ # } ++ # } + + # For each action, look at /etc/rc*.d/* files to see if it is + # started at boot +Index: webmin-1.570/init/init-lib.pl +=================================================================== +--- webmin-1.570.orig/init/init-lib.pl ++++ webmin-1.570/init/init-lib.pl +@@ -108,15 +108,17 @@ List boot time action names from init.d, + =cut + sub list_actions + { +-local($dir, $f, @stbuf, @rv); ++local($dir, $f, @stbuf, @rv, @exclude); + $dir = $config{init_dir}; ++@exclude = split(/,/, $config{exclude}); + opendir(DIR, $dir); + foreach $f (sort { lc($a) cmp lc($b) } readdir(DIR)) { + if ($f eq "." || $f eq ".." || $f =~ /\.bak$/ || $f eq "functions" || + $f eq "core" || $f eq "README" || $f eq "rc" || $f eq "rcS" || + -d "$dir/$f" || $f =~ /\.swp$/ || $f eq "skeleton" || + $f =~ /\.lock$/ || $f =~ /\.dpkg-(old|dist)$/ || +- $f =~ /^\.depend\./ || $f eq '.legacy-bootordering') { next; } ++ $f =~ /^\.depend\./ || $f eq '.legacy-bootordering' || ++ grep {$_ eq $f} @exclude ) { next; } + if (@stbuf = stat("$dir/$f")) { + push(@rv, "$f $stbuf[1]"); + } diff --git a/recipes-extended/webmin/webmin_1.570.bb b/recipes-extended/webmin/webmin_1.570.bb index 7dce8da..6fb1412 100644 --- a/recipes-extended/webmin/webmin_1.570.bb +++ b/recipes-extended/webmin/webmin_1.570.bb @@ -9,10 +9,11 @@ RDEPENDS_${PN} += "perl-module-warnings perl-module-warnings-register perl-modul RDEPENDS_${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant" RDEPENDS_${PN} += "perl-module-file perl-module-file-glob perl-module-sdbm perl-module-sdbm-file" -PR = "r0" +PR = "r1" SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \ - file://setup.sh" + file://setup.sh \ + file://init-exclude.patch" inherit allarch perlnative update-rc.d @@ -31,6 +32,7 @@ do_configure() { # Adjust configs mv init/config-debian-linux init/config-generic-linux sed -i "s/shutdown_command=.*/shutdown_command=poweroff/" init/config-generic-linux + echo "exclude=bootmisc.sh,single,halt,reboot,hostname.sh,modutils.sh,mountall.sh,mountnfs.sh,networking,populate-volatile.sh,rmnologin.sh,save-rtc.sh,umountfs,umountnfs.sh,hwclock.sh,checkroot.sh,banner.sh,udev,udev-cache,devpts.sh,psplash.sh,sendsigs,fbsetup,bootlogd,stop-bootlogd,sysfs.sh,syslog,syslog.busybox,urandom,webmin" >> init/config-generic-linux # Fix insane naming that causes problems at packaging time (must be done before deleting below) find . -name "*\**" -exec rename \* ALL {} \; |