Bug 236858 - sys-apps/util-linux-2.14 installs non-POSIX /etc/init.d/crypto-loop
Bug#: 236858 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: vaeth@mathematik.uni-wuerzburg.de
Component: Ebuilds
URL: 
Summary: sys-apps/util-linux-2.14 installs non-POSIX /etc/init.d/crypto-loop
Keywords:  
Status Whiteboard: 
Opened: 2008-09-06 12:57 0000
Description:   Opened: 2008-09-06 12:57 0000
As the summary says, file/crypto-loop.initd uses several bashisms which make
the file fail if e.g. /bin/sh is a symlink to dash.
As usual, only small syntax changes are necessary to make it POSIX compliant.
I attach a patch.

------- Comment #1 From Martin Väth 2008-09-06 13:05:23 0000 -------
Created an attachment (id=164719) [details]
Patch to make crypto-loop.initd POSIX compliant

The patch in addition removes the redundant call of "ls" which might have
produced a confusing error message if no /dev/loop[0-9] exists
(and a new line was inserted to deal with that case).

------- Comment #2 From Wormo 2008-09-06 17:59:50 0000 -------
Thanks for the cleanup patch, assigning to maintainers

------- Comment #3 From SpanKY 2008-10-26 03:16:36 0000 -------
changing [[ -n ${var} ]] to [ -n ${var} ] is broken

ive fixed things up and committed it, thanks

http://sources.gentoo.org/sys-apps/util-linux/files/crypto-loop.initd?r1=1.3&r2=1.4