BTS

Issue455

Title grml-shlib not compatible with dash?
Priority bug Status resolved
Superseder Nosy List bene, gebi, mika
Assigned To gebi Topics release-stopper

Created on 2008-04-27.21:38:37 by bene, last changed 2008-04-28.23:07:28 by mika.

Messages
msg1297 (view) Author: mika Date: 2008-04-28.23:07:27
New grml-crypt version is in the pool (thanks, Gebi):

http://deb.grml.org/pool/main/g/grml-crypt/
http://hg.grml.org/grml-crypt/

Closing the bugreport, Thomas please feel free to re-open it if you encounter 
any problems - thanks!

thx && regards,
-mika-
msg1296 (view) Author: gebi Date: 2008-04-28.07:55:11
yes, grml-shlib will never be posix-compatible ;).

as i got no bugs from testers about grml-crypt with /bin/bash i'll release it 
during the day.
msg1295 (view) Author: mika Date: 2008-04-28.07:53:31
* Michael Gebetsroither <bts@bts.grml.org> [20080428 09:52]:

> yes, grml-shlib will never be posix-compatible ;).

> as i got no bus from testers about grml-crypt with /bin/bash i'll release it 
> during the day.

Great, I'll upload the package as soon as you tagged it. :)

thx && regards,
-mika-
msg1293 (view) Author: mika Date: 2008-04-27.21:46:45
Yeah, known issue - see http://bts.grml.org/grml/issue180

I once wrote a patch against grml-shlib which makes it POSIX compatible, though
Gebi (author and maintainer of grml-shlib and grml-crypt) does not want to use
POSIX-only. ;) There's a fix for grml-crypt (simply using /bin/bash instead of
/bin/sh) pending in our version control - just not packaged and uploaded yet.

Gebi, care to release 0.16 (currently tagged with UNRELEASED) so we fix this
issue? :)

thx! && regards,
-mika-
msg1292 (view) Author: bene Date: 2008-04-27.21:38:36
I just installed grml-crypt and grml-shlib packages on Ubuntu Hardy Heron 
(8.04). 

ii  grml-crypt          0.15           wrapper around cryptsetup-luks
ii  grml-shlib          1.02.13        Generic shell library used in grml 
scripts

Apparently, Ubuntu uses dash as default shell for /bin/sh as it states to be 
POSIX compliant. 
But when I call grml-crypt (for example) with dash, the following happens: 

bene@hp:~/Desktop$ sudo /usr/sbin/grml-crypt
/etc/grml/sh-lib: 37: function: not found
[... similar lines omitted here ...]
/etc/grml/sh-lib: 68: function: not found
[: 78: Illegal number: -a
/etc/grml/sh-lib: 81: function: not found
/etc/grml/sh-lib: 86: vprint: not found
[... similar lines omitted here ...]
/etc/grml/sh-lib: 104: vprint: not found
/etc/grml/sh-lib: 106: function: not found
PANIC:
/etc/grml/sh-lib: 122: _syslog: not found
Terminated
bene@hp:~/Desktop$

Using bash, the behaviour is as intended:

bene@hp:~/Desktop$ sudo /bin/bash /usr/sbin/grml-crypt
Usage: "grml-crypt" [OPTIONS] action <device/file> [mountpoint]

grml-crypt is a wrapper around cryptsetup with LUKS support to format a device
[...]
History
Date User Action Args
2008-04-28 23:07:28mikasetstatus: wont-fix -> resolved
nosy: mika, gebi, bene
messages: + msg1297
2008-04-28 22:39:12gebisetstatus: in-progress -> wont-fix
nosy: mika, gebi, bene
2008-04-28 07:55:11gebisetnosy: mika, gebi, bene
messages: + msg1296
2008-04-28 07:54:55gebisetnosy: mika, gebi, bene
messages: - msg1294
2008-04-28 07:53:31mikasetnosy: mika, gebi, bene
messages: + msg1295
2008-04-28 07:52:28gebisetnosy: mika, gebi, bene
messages: + msg1294
2008-04-27 21:46:45mikasetstatus: unread -> in-progress
nosy: + mika, gebi
topic: + release-stopper
messages: + msg1293
assignedto: gebi
2008-04-27 21:38:37benecreate