commit: 783374a7d24e310fcf0a49e16c10687bd515d66a Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sat Jan 17 16:55:46 2015 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sat Jan 17 16:55:46 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=783374a7
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. --- ChangeLog | 6 ++++++ modules/rc.eselect | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b27214b..01b8d14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-01-17 Ulrich Müller <u...@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 <u...@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 }