[zfs-discuss] Re: update-manager: zfs-dkms (0.6.0.54-1ubuntu1~oneiric1) ... failures
rlaager at wiktel.com
Mon Apr 2 20:39:33 EDT 2012
On Mon, 2012-04-02 at 18:29 -0500, Darik Horn wrote:
> That won't work as intended because the these scripts are invoked with
> the -e switch. Using `|| true` instead might get the desired result.
> But that would mask the actual problem: Why is`[ -x ... ]`
> misbehaving on some minimal Ubuntu installations?
It's not misbehaving. Your postinst script is doing:
[ -x foo ] && foo
When foo isn't executable, this is equivalent to:
false && irrelevant
which evaluates to:
With -e, the script exits with a failure status.
You want this instead:
if [ -x foo ] ; then
[ -x foo ] && foo || true
The latter is used by dbus.postinst. Everything else* on my system uses
the former approach, which I think is clearer.
* That's not strictly true. network-manager.postinst has the same,
broken, code as zfs-dkms. I just filed a bug report for that.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part
More information about the zfs-discuss