summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2014-02-09 17:25:45 +0100
committerUlrich Müller <ulm@gentoo.org>2014-02-09 17:25:45 +0100
commit38614e63db2a5a124bc5971309c80c5c9533770e (patch)
tree4d4b2c792232ad783ef9a069720dc3c7f266806e
parentRecognise arm64 in package-manager lib. (diff)
downloadeselect-38614e63db2a5a124bc5971309c80c5c9533770e.tar.gz
eselect-38614e63db2a5a124bc5971309c80c5c9533770e.tar.bz2
eselect-38614e63db2a5a124bc5971309c80c5c9533770e.zip
Do not source functions.sh in rc module, bug 373219.
* 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.
-rw-r--r--ChangeLog8
-rw-r--r--modules/rc.eselect17
2 files changed, 10 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 61e7e66..a4cec21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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