diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | modules/rc.eselect | 17 |
2 files changed, 10 insertions, 15 deletions
@@ -1,3 +1,11 @@ +2014-02-09 Ulrich Müller <ulm@gentoo.org> + + * modules/rc.eselect (get_runlevel): Call "rc-status -r" directly, + in order to avoid sourcing functions.sh, bug 373219. + Remove baselayout-1 compatibility code. + (source_rc_functions): Remove function. + (do_show): Don't call source_rc_functions. + 2014-01-19 Ulrich Müller <ulm@gentoo.org> * libs/package-manager.bash.in (arch): Recognise aarch64*/arm64. diff --git a/modules/rc.eselect b/modules/rc.eselect index a661445..dc8b0d5 100644 --- a/modules/rc.eselect +++ b/modules/rc.eselect @@ -7,22 +7,11 @@ inherit config DESCRIPTION="Manage /etc/init.d scripts in runlevels" MAINTAINER="eselect@gentoo.org" -# source_rc_functions PRIVATE -# API for OpenRC -source_rc_functions() { - [[ ${RC_GOT_FUNCTIONS} = yes ]] && return - source "${EPREFIX}/etc/init.d/functions.sh" \ - || die "Failed to source functions.sh" -} - # get_runlevel PRIVATE # determine the current runlevel -# this is only functional if source_rc_functions has been called before get_runlevel() { - if type rc_runlevel &>/dev/null; then - rc_runlevel || die "rc_runlevel failed" - elif [[ -n ${SOFTLEVEL} ]]; then - echo "${SOFTLEVEL}" + if type rc-status &>/dev/null; then + rc-status -r || die "rc_status failed" else die "Cannot determine runlevel" fi @@ -240,8 +229,6 @@ describe_show_options() { do_show() { local runlevel all unused n x - source_rc_functions - if [[ $# -eq 0 ]]; then set -- "$(get_runlevel)" else |