Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 335297 - net-misc/miredo: remove bashism from init.d script
Summary: net-misc/miredo: remove bashism from init.d script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Thilo Bangert (RETIRED) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-30 17:26 UTC by Kai Krakow
Modified: 2010-08-31 12:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Krakow 2010-08-30 17:26:19 UTC
To conform with POSIX and use non-bash shells as default-sh with baselayout-2, the following bashism in the init.d script needs to be fixed ([[...]] syntax replaced by test, line 13+14):

test "${MIREDO_MODPROBE_IPV6}" = "yes" && modprobe ipv6                                                                                             
test "${MIREDO_MODPROBE_TUN}" = "yes" && modprobe tun                                                                                               

Reproducible: Always
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-08-31 11:21:27 UTC
+*miredo-1.2.3-r1 (31 Aug 2010)
+
+  31 Aug 2010; Michael Weber <xmw@gentoo.org> -miredo-1.2.3.ebuild,
+  +miredo-1.2.3-r1.ebuild, files/miredo.rc:
+  Revision bump to fix bug #335297, thanks to Kai Krakow
+  <hurikhan77+bgo@gmail.com>


Index: files/miredo.rc
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-misc/miredo/files/miredo.rc,v
retrieving revision 1.1
diff -u -B -r1.1 miredo.rc
--- files/miredo.rc     3 May 2010 09:59:23 -0000       1.1
+++ files/miredo.rc     31 Aug 2010 11:20:29 -0000
@@ -10,8 +10,8 @@
 
 start() {
        ebegin "Starting Miredo"
-       [ "${MIREDO_MODPROBE_IPV6}" == "yes" ] && modprobe ipv6
-       [ "${MIREDO_MODPROBE_TUN}" == "yes" ] && modprobe tun
+       test "${MIREDO_MODPROBE_IPV6}" = "yes" && modprobe ipv6
+       test "${MIREDO_MODPROBE_TUN}" = "yes" && modprobe tun
        start-stop-daemon --start --quiet --exec /usr/sbin/miredo -- \
                ${MIREDO_OPTS}
        eend $?
Comment 2 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2010-08-31 12:44:38 UTC
thanks