1 |
commit: b9bf4b08bd230a76a8f40443292aff67dcde6d06 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 9 05:24:42 2018 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 9 05:24:42 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9bf4b08 |
7 |
|
8 |
net-analyzer/mrtg: Fix bashisms in init.d script. |
9 |
|
10 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
11 |
|
12 |
net-analyzer/mrtg/files/mrtg.rc | 12 ++++++------ |
13 |
1 file changed, 6 insertions(+), 6 deletions(-) |
14 |
|
15 |
diff --git a/net-analyzer/mrtg/files/mrtg.rc b/net-analyzer/mrtg/files/mrtg.rc |
16 |
index d1ee6861cd4..0ff5d0783f3 100644 |
17 |
--- a/net-analyzer/mrtg/files/mrtg.rc |
18 |
+++ b/net-analyzer/mrtg/files/mrtg.rc |
19 |
@@ -1,5 +1,5 @@ |
20 |
#!/sbin/openrc-run |
21 |
-# Copyright 1999-2005 Gentoo Foundation |
22 |
+# Copyright 1999-2018 Gentoo Foundation |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
depend() { |
26 |
@@ -10,7 +10,7 @@ depend() { |
27 |
} |
28 |
|
29 |
checkconfig() { |
30 |
- if [[ ! -f ${MRTG_CONF} ]] ; then |
31 |
+ if [ ! -f ${MRTG_CONF} ] ; then |
32 |
eerror "Please create ${MRTG_CONF} (try man cfgmaker)" |
33 |
return 1 |
34 |
fi |
35 |
@@ -22,21 +22,21 @@ checkconfig() { |
36 |
start() { |
37 |
# mrtg will not run if LANG=*utf8 |
38 |
# use grep instead of bash regexp for bug #159786 |
39 |
- [[ "$(echo $LANG|grep -E '((^[A-Za-z0-9\_\@\-]+\.)|(^))([uU][tT][fF]-?8)$')" ]] \ |
40 |
+ [ "$(echo $LANG|grep -E '((^[A-Za-z0-9\_\@\-]+\.)|(^))([uU][tT][fF]-?8)$')" ] \ |
41 |
&& LANG='C' |
42 |
|
43 |
checkconfig || return $? |
44 |
|
45 |
# enable logging? |
46 |
- [[ -n "${MRTG_LOG}" ]] && \ |
47 |
+ [ -n "${MRTG_LOG}" ] && \ |
48 |
MRTG_OPTS="${MRTG_OPTS} --logging ${MRTG_LOG}" |
49 |
|
50 |
# run as a different user? |
51 |
- [[ -n "${MRTG_USER}" ]] && \ |
52 |
+ [ -n "${MRTG_USER}" ] && \ |
53 |
MRTG_OPTS="${MRTG_OPTS} --user ${MRTG_USER}" |
54 |
|
55 |
# run as a different group? |
56 |
- [[ -n "${MRTG_GROUP}" ]] && \ |
57 |
+ [ -n "${MRTG_GROUP}" ] && \ |
58 |
MRTG_OPTS="${MRTG_OPTS} --group ${MRTG_GROUP}" |
59 |
|
60 |
ebegin "Starting mrtg" |