Am 02.11.2014 um 03:06 schrieb Ben Hutchings: > On Sun, 2014-11-02 at 02:34 +0100, Christian Hofstaedtler wrote: >> * Ben Hutchings <b...@decadent.org.uk> [141101 14:02]: >>> On Sat, 2014-11-01 at 13:22 +0100, Christian Hofstaedtler wrote:
>> dash "backs up" any FDs it redirects, so it can restore them >> later on. bash just closes them outright in this situation (forked >> subshell + parent exits), causing udev's spawn_read to immediately, >> thereby marking the udev event as finished. > > That makes *much* more sense. [..] >> I'd suggest the following patch, as a stop gap for sysvinit users: >> >> Index: systemd-215/debian/extra/net.agent >> =================================================================== >> --- systemd-215.orig/debian/extra/net.agent 2014-09-27 >> 17:50:52.000000000 +0200 >> +++ systemd-215/debian/extra/net.agent 2014-11-02 02:33:40.970469131 +0100 >> @@ -1,4 +1,4 @@ >> -#!/bin/sh -e >> +#!/bin/bash -e [..] > This seems to work under both bash and dash: > > exec > /dev/null 2> /dev/null > do_everything & Thanks Ben and Christian for further debugging this. I suspected the problem to be related to file descriptors when this issue came up on debian-user [1] back in July. There I suggested to use ( do_everything ) > /dev/null 2> /dev/null & as a possible workaround. I don't particularly like using a subshell but I'm just posting it for completeness sake here. I admit, I don't quite understand Ben's patch, which runs "exec" twice: Once before do_everything() and later for the actual ifup/ifdown call. What exactly does the first exec do to fix this? Marco, do you have any preference? Michael [1] https://lists.debian.org/debian-user/2014/07/msg01509.html -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature