1 |
commit: 38614e63db2a5a124bc5971309c80c5c9533770e |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 9 16:25:45 2014 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 9 16:25:45 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=38614e63 |
7 |
|
8 |
Do not source functions.sh in rc module, bug 373219. |
9 |
|
10 |
* modules/rc.eselect (get_runlevel): Call "rc-status -r" directly, |
11 |
in order to avoid sourcing functions.sh, bug 373219. |
12 |
Remove baselayout-1 compatibility code. |
13 |
(source_rc_functions): Remove function. |
14 |
(do_show): Don't call source_rc_functions. |
15 |
|
16 |
--- |
17 |
ChangeLog | 8 ++++++++ |
18 |
modules/rc.eselect | 17 ++--------------- |
19 |
2 files changed, 10 insertions(+), 15 deletions(-) |
20 |
|
21 |
diff --git a/ChangeLog b/ChangeLog |
22 |
index 61e7e66..a4cec21 100644 |
23 |
--- a/ChangeLog |
24 |
+++ b/ChangeLog |
25 |
@@ -1,3 +1,11 @@ |
26 |
+2014-02-09 Ulrich Müller <ulm@g.o> |
27 |
+ |
28 |
+ * modules/rc.eselect (get_runlevel): Call "rc-status -r" directly, |
29 |
+ in order to avoid sourcing functions.sh, bug 373219. |
30 |
+ Remove baselayout-1 compatibility code. |
31 |
+ (source_rc_functions): Remove function. |
32 |
+ (do_show): Don't call source_rc_functions. |
33 |
+ |
34 |
2014-01-19 Ulrich Müller <ulm@g.o> |
35 |
|
36 |
* libs/package-manager.bash.in (arch): Recognise aarch64*/arm64. |
37 |
|
38 |
diff --git a/modules/rc.eselect b/modules/rc.eselect |
39 |
index a661445..dc8b0d5 100644 |
40 |
--- a/modules/rc.eselect |
41 |
+++ b/modules/rc.eselect |
42 |
@@ -7,22 +7,11 @@ inherit config |
43 |
DESCRIPTION="Manage /etc/init.d scripts in runlevels" |
44 |
MAINTAINER="eselect@g.o" |
45 |
|
46 |
-# source_rc_functions PRIVATE |
47 |
-# API for OpenRC |
48 |
-source_rc_functions() { |
49 |
- [[ ${RC_GOT_FUNCTIONS} = yes ]] && return |
50 |
- source "${EPREFIX}/etc/init.d/functions.sh" \ |
51 |
- || die "Failed to source functions.sh" |
52 |
-} |
53 |
- |
54 |
# get_runlevel PRIVATE |
55 |
# determine the current runlevel |
56 |
-# this is only functional if source_rc_functions has been called before |
57 |
get_runlevel() { |
58 |
- if type rc_runlevel &>/dev/null; then |
59 |
- rc_runlevel || die "rc_runlevel failed" |
60 |
- elif [[ -n ${SOFTLEVEL} ]]; then |
61 |
- echo "${SOFTLEVEL}" |
62 |
+ if type rc-status &>/dev/null; then |
63 |
+ rc-status -r || die "rc_status failed" |
64 |
else |
65 |
die "Cannot determine runlevel" |
66 |
fi |
67 |
@@ -240,8 +229,6 @@ describe_show_options() { |
68 |
do_show() { |
69 |
local runlevel all unused n x |
70 |
|
71 |
- source_rc_functions |
72 |
- |
73 |
if [[ $# -eq 0 ]]; then |
74 |
set -- "$(get_runlevel)" |
75 |
else |