diff options
author | Ulrich Müller <ulm@gentoo.org> | 2015-01-17 17:55:46 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2015-01-17 17:55:46 +0100 |
commit | 783374a7d24e310fcf0a49e16c10687bd515d66a (patch) | |
tree | 0badf685030a27876d7e7da899b5c8b1c2fc598c | |
parent | Happy new year 2015! (diff) | |
download | eselect-783374a7d24e310fcf0a49e16c10687bd515d66a.tar.gz eselect-783374a7d24e310fcf0a49e16c10687bd515d66a.tar.bz2 eselect-783374a7d24e310fcf0a49e16c10687bd515d66a.zip |
Be compatible with new OpenRC in rc module.
* modules/rc.eselect: Be compatible with new OpenRC, bug 536822.
(is_script): Test for "openrc-run" or "runscript" in shebang line.
(run_runscript): Omit the interpreter when executing the script.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | modules/rc.eselect | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2015-01-17 Ulrich Müller <ulm@gentoo.org> + + * modules/rc.eselect: Be compatible with new OpenRC, bug 536822. + (is_script): Test for "openrc-run" or "runscript" in shebang line. + (run_runscript): Omit the interpreter when executing the script. + 2014-09-01 Ulrich Müller <ulm@gentoo.org> * configure.ac: Update version to 1.4.3. diff --git a/modules/rc.eselect b/modules/rc.eselect index 82eb6ef..2a9bf5b 100644 --- a/modules/rc.eselect +++ b/modules/rc.eselect @@ -37,7 +37,7 @@ is_script() { && ${file%%.sh} = ${file} \ && ${file%%\~} = ${file} \ && -e ${file} ]] \ - && grep "^#\!/sbin/runscript" "${file}" &>/dev/null + && grep '^#!.*/\(runscript\|openrc-run\)' "${file}" &>/dev/null } # find_scripts PRIVATE @@ -92,7 +92,7 @@ run_runscript() { shift for script; do is_script "${EROOT}/etc/init.d/${script}" \ - && /sbin/runscript "${EROOT}/etc/init.d/${script}" "${command}" + && "${EROOT}/etc/init.d/${script}" "${command}" done } |