Message-ID: <email address hidden>
Date: Sun, 27 Feb 2005 15:22:08 +0100
From: <email address hidden> (Jan Echternach)
To: <email address hidden>
Subject: Re: Bug#297137: hotplug: /etc/init.d/hotplug stopped working because 'unset' fails
On Sun, Feb 27, 2005 at 01:34:20PM +0100, Marco d'Itri wrote:
> I tested this script with bash, dash and even posh, and it works fine.
>
> #!/bin/sh -e
> echo a
> unset no_such_variable1 no_such_variable2
> echo b
jan@ogar:~$ ./testunset.sh
a
jan@ogar:~$ dpkg -S /bin/sh
bash: /bin/sh
jan@ogar:~$ dpkg -l bash
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii bash 2.05a-11 The GNU Bourne Again SHell
After upgrading bash to bash/unstable:
jan@ogar:~$ ./testunset.sh
a
b
jan@ogar:~$ dpkg -l bash
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii bash 3.0-14 The GNU Bourne Again SHell
Looks like a bug in old bash versions since SUSv2 says
"Unsetting a variable or function that was not previously set is not
considered an error and will not cause the shell to abort."
--
Jan fortune: can't load library '/libc.so.4' No such library.
Message-ID: <email address hidden>
Date: Sun, 27 Feb 2005 15:22:08 +0100
From: <email address hidden> (Jan Echternach)
To: <email address hidden>
Subject: Re: Bug#297137: hotplug: /etc/init.d/hotplug stopped working because 'unset' fails
On Sun, Feb 27, 2005 at 01:34:20PM +0100, Marco d'Itri wrote:
> I tested this script with bash, dash and even posh, and it works fine.
>
> #!/bin/sh -e
> echo a
> unset no_such_variable1 no_such_variable2
> echo b
jan@ogar:~$ ./testunset.sh Unknown/ Install/ Remove/ Purge/Hold Not/Installed/ Config- files/Unpacked/ Failed- config/ Half-installed /Hold/Reinst- required/ X=both- problems (Status,Err: uppercase=bad) ======= ====-== ======= =====-= ======= ======= ======= ======= ======= ======= =
a
jan@ogar:~$ dpkg -S /bin/sh
bash: /bin/sh
jan@ogar:~$ dpkg -l bash
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Description
+++-===
ii bash 2.05a-11 The GNU Bourne Again SHell
After upgrading bash to bash/unstable:
jan@ogar:~$ ./testunset.sh Unknown/ Install/ Remove/ Purge/Hold Not/Installed/ Config- files/Unpacked/ Failed- config/ Half-installed /Hold/Reinst- required/ X=both- problems (Status,Err: uppercase=bad) ======= ====-== ======= =====-= ======= ======= ======= ======= ======= ======= =
a
b
jan@ogar:~$ dpkg -l bash
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Description
+++-===
ii bash 3.0-14 The GNU Bourne Again SHell
Looks like a bug in old bash versions since SUSv2 says
"Unsetting a variable or function that was not previously set is not
considered an error and will not cause the shell to abort."
--
No such library.
Jan fortune: can't load library '/libc.so.4'