Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 447236

Summary: sys-process/acct - bashisms in init.d script
Product: Gentoo Linux Reporter: Alexander Tsoy <alexander>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: AlphatPC
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alexander Tsoy 2012-12-14 13:02:00 UTC
Please fix bashisms in init.d script

possible bashism in /usr/portage/sys-process/acct/files/acct.initd line 13 (export foo=bar should be foo=bar; export foo):
	export ACCT_LOG=${ACCT_LOG:-/var/account/pacct}
possible bashism in /usr/portage/sys-process/acct/files/acct.initd line 14 (alternative test command ([[ foo ]] should be [ foo ])):
	if [[ ! -e ${ACCT_LOG} ]] ; then

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2012-12-16 23:49:27 UTC
(In reply to comment #0)

[[...]] is wrong and i'll fix that.  `export foo=bar` is not wrong and whatever script you're using is broken.  that is valid POSIX.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#export
export name[=word]...
Comment 2 SpanKY gentoo-dev 2012-12-16 23:50:31 UTC
should be all set now in the tree; thanks for the report!

Commit message: Use [...] rather than [[...]] in init.d
http://sources.gentoo.org/sys-process/acct/files/acct.initd?r1=1.3&r2=1.4
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-12-17 13:08:24 UTC
*** Bug 447550 has been marked as a duplicate of this bug. ***