tags 407643 moreinfo
quit

On Sat, Jan 20, 2007 at 11:40:51AM +0200, Leonard Norrgard wrote:
> [2]
> > # dash
> > $ id
> > uid=0(root) gid=0(root) groups=0(root)
> > $ . ./postrm purge
      ^^^^^^^^^^^^^^^^
> > $ echo $?
> > 0
> > $ ls -l /etc/udev/rules.d/z60_kvm.rules
> > lrwxrwxrwx 1 root root 12 Jan 20 11:19 /etc/udev/rules.d/z60_kvm.rules
> > -> ../kvm.rules
> > $ cat postrm
> > #!/bin/sh
> > set -e
> > # Automatically added by dh_installudev
> > if [ "$1" = purge ]; then
       ^^^^^^^^^^^^^^^^
> >         [ -L /etc/udev/rules.d/z60_kvm.rules ] && \
> >         rm /etc/udev/rules.d/z60_kvm.rules
> > fi
> > # End automatically added section
> > $ exit

Hi, sourcing a script with 'dot' doesn't set the positional parameters,
see http://www.opengroup.org/onlinepubs/009695399/utilities/dot.html,
so when doing '. ./postrm purge', $1 will not necessarily be 'purge'.
If not, the script simply exits 0 because the first condition in not
met.

I not yet see the serious bug in dash.

Regards, Gerrit.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to