fails in dash - should be changed to #!/bin/bash

Bug #72601 reported by Alex Sutcliffe
14
Affects Status Importance Assigned to Milestone
a2mp3 (Ubuntu)
Fix Released
Medium
Vassilis Pandis
grml-shlib (Ubuntu)
Fix Released
Medium
Michael Bienia

Bug Description

Using feisty and a2mp3 0.01 - running a2mp3 with dash as default sh fails producing the ouput below. Problem is that it sources /etc/grml/sh-lib which uses keywords like function and vprint not supported by dash. Changing a2mp3 to #!/bin/bash should fix it but grml is really developed in zsh

Output:

/etc/grml/sh-lib: 37: function: not found
/etc/grml/sh-lib: 39: function: not found
/etc/grml/sh-lib: 41: function: not found
/etc/grml/sh-lib: 42: function: not found
/etc/grml/sh-lib: 44: function: not found
/etc/grml/sh-lib: 45: function: not found
/etc/grml/sh-lib: 46: function: not found
/etc/grml/sh-lib: 52: function: not found
/etc/grml/sh-lib: 53: function: not found
/etc/grml/sh-lib: 54: function: not found
/etc/grml/sh-lib: 55: function: not found
/etc/grml/sh-lib: 57: function: not found
/etc/grml/sh-lib: 58: function: not found
/etc/grml/sh-lib: 60: function: not found
/etc/grml/sh-lib: 61: function: not found
/etc/grml/sh-lib: 68: function: not found
[: 78: -a: bad number
/etc/grml/sh-lib: 81: function: not found
/etc/grml/sh-lib: 86: vprint: not found
/etc/grml/sh-lib: 89: function: not found
/etc/grml/sh-lib: 92: vprint: not found
/etc/grml/sh-lib: 95: function: not found
/etc/grml/sh-lib: 98: vprint: not found
/etc/grml/sh-lib: 101: function: not found
/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

Revision history for this message
kasi (kasi-msfirefox) wrote :

I can confirm that.

Revision history for this message
Vassilis Pandis (pandisv) wrote :

I can confirm this too on current feisty.

Changed in a2mp3:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Changed in a2mp3:
assignee: nobody → pandisv
status: Confirmed → In Progress
Revision history for this message
Vassilis Pandis (pandisv) wrote :

a2mp3 (0.01-0ubuntu1) feisty; urgency=low

  * Change versioning to the 0.01-0* format, since this is not in Debian yet.
    (closes Malone #78805)
  * Use #!/bin/bash instead of #!/bin/sh, since a POSIX shell won't do (Malone #72601)

 -- Vassilis Pandis <email address hidden> Sun, 11 Feb 2007 23:08:08 +0000

Michael Bienia (geser)
Changed in grml-shlib:
assignee: nobody → geser
importance: Undecided → Medium
status: Unconfirmed → In Progress
Revision history for this message
Michael Bienia (geser) wrote :

A better fix is to make grml-shlib and a2mp3 work with dash which isn't in this case that hard.
I've uploaded fixed packages for both.

Changed in grml-shlib:
status: In Progress → Fix Committed
Changed in a2mp3:
status: In Progress → Fix Committed
Michael Bienia (geser)
Changed in grml-shlib:
status: Fix Committed → Fix Released
Changed in a2mp3:
status: Fix Committed → Fix Released
Revision history for this message
Michael R. Head (burner) wrote :

a2mp3 isn't quite there yet.

burner@phoenix:~$ a2mp3 in.mp3
in.mp3 => in.mp3
/usr/bin/a2mp3: 1: [[: not found

and it gets worse if the command is repeated:

burner@phoenix:~$ a2mp3 in.mp3
/usr/bin/a2mp3: 202: num_++: not found
in.mp3 => in_1.mp3
/usr/bin/a2mp3: 1: [[: not found

I do agree that it would be best if the packages were fixed to use just standard POSIX sh features.

Revision history for this message
Michael Bienia (geser) wrote :

I've uploaded a2mp3 0.01-0ubuntu2 which should hopefully fix this.

Please let me know if it works now or if I still have missed something.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.