dash issue after breezy->edgy upgrade (was: Edgy intel compiler problems cause me to bash dash)

Jhair Tocancipa Triana jhair.tocancipa at gmail.com
Wed Nov 1 23:34:48 UTC 2006


Daniel T Chen writes:

> Michael T. Richter wrote:
>> Why the change?

> https://wiki.ubuntu.com/DashAsBinSh

Monty Taylor <monty at inaugust.com> writes:

> Package: oprofile
> Version: 0.9.2-1
> Severity: grave
> Justification: renders package unusable


> This is a simple one, but breaks a fundamental part of the oprofile
> package.

> Try this:

> opcontrol --init
> opcontrol --setup --separate=lib,kernel,thread --no-vmlinux

> And you get a shell error. Changing opcontrol's magic line to use
> /bin/bash fixes the error. 

I see there seem to be also other issues with the bash->dash
transition.

I have a /etc/ppp/ip-up.d/1vpn_routes-up to setup the route table
after I connect to my company VPN.

The script structure looks like follows:

--8<---------------cut here---------------start------------->8---
#!/bin/sh

if [ ${PPP_IPPARAM} == "vpn_tunnel" ];
then
        # set up the route table
        # ...        
        exit 0
fi
--8<---------------cut here---------------end--------------->8---

Before the edgy upgrade the script used to work. Now dash complains
with:

$ ./vpn_routes-up
[: 9: ==: unexpected operator

However

$ bash -posix ./vpn_routes-up

executes the script without problems.

The script runs fine with dash if I replace

        if [ ${PPP_IPPARAM} == "vpn_tunnel" ];

with

        if [ ${PPP_IPPARAM} = "vpn_tunnel" ];

Is this a dash bug? Or a bash bug? I've *heard* POSIX mandates =
instead == in this case but I don't have a reference at hand for that.

Thanks,

-- 
--Jhair





More information about the ubuntu-users mailing list