Your message dated Fri, 01 Jan 2016 23:49:24 +0000
with message-id <[email protected]>
and subject line Bug#809171: fixed in ifupdown 0.8.5
has caused the Debian Bug report #809171,
regarding Please handle network device hotplug events (move from udev)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
809171: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809171
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ifupdown
Severity: wishlist
Version: 0.8.4

Hello,

for historical reasons the udev package has shipped the functionality
for handling network device hotplug events. However, it's a bit weird
to ship the coldplugging parts (/etc/init.d/networking and
networking.service) in ifupdown, but not the hotplugging ones. It
would be more consistent to ship both in ifupdown and also make it
easier to do changes. Of course the systemd packagers are still happy
to discuss changes to the udev bits and provide guidance.

This involves three parts:

 * An udev rule which reacts to adding or removing network devices.
   This is currently shipped as /lib/udev/rules.d/80-networking.rules
   but I propose that ifupdown ships it as
   /lib/udev/rules.d/80-ifupdown.rules to avoid a package file
   conflict and also to make it clearer that this applies to ifupdown
   only. I attach this as 80-ifupdown.rules.

 * The above rule just calls an udev helper script "ifupdown" which
   needs to be put into /lib/udev/. This does the actual work of
   calling either ifup $IFACE directly (under SysV init or upstart) or
   a systemd unit "[email protected]" under systemd. The latter is
   necessary as udev rules must not start long-running programs (ifup
   can take quite long), and it also provides much nicer and cleaner
   logging, a proper shutdown order, etc.

   I attach this as "ifupdown".

 * The [email protected] helper unit. This should go into

     `pkg-config --variable=systemdsystemunitdir systemd`

   aka /lib/systemd/system/. It does not need to be enabled in any way
   as the above udev helper rule will start/stop it.

   Note that this will file-conflict with udev with this name, so
   if/once you accept this we'll need to remove the above bits from
   udev and add a Breaks:/Replaces: to ifupdown and a Breaks: to udev.

Please let us know if you have any questions about these!

Thanks for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
#!/bin/sh -e
#
# run /sbin/{ifup,ifdown} with the --allow=hotplug option.
#

PATH='/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin'

if [ -x /usr/bin/logger ]; then
        LOGGER=/usr/bin/logger
elif [ -x /bin/logger ]; then
        LOGGER=/bin/logger
else
        unset LOGGER
fi

# for diagnostics
if [ -t 1 -a -z "$LOGGER" ] || [ ! -e '/dev/log' ]; then
        mesg() {
                echo "$@" >&2
        }
elif [ -t 1 ]; then
        mesg() {
                echo "$@"
                $LOGGER -t "${0##*/}[$$]" "$@"
        }
else
        mesg() {
                $LOGGER -t "${0##*/}[$$]" "$@"
        }
fi

if [ -z "$INTERFACE" ]; then
    mesg "Bad ifupdown udev helper invocation: \$INTERFACE is not set"
    exit 1
fi

check_program() {
    [ -x $1 ] && return 0

    mesg "ERROR: $1 not found. You need to install the ifupdown package."
    mesg "ifupdown udev helper $ACTION event for $INTERFACE not handled."
    exit 1
}

wait_for_interface() {
    local interface=$1
    local state

    while :; do
        read state /sys/class/net/$interface/operstate 2>/dev/null || true
        if [ "$state" != down ]; then
                return 0
        fi
        sleep 1
    done
}

net_ifup() {
    check_program /sbin/ifup

    # exit if the interface is not configured as allow-hotplug
    if ! ifquery --allow hotplug -l | grep -q "^${INTERFACE}\$"; then
        exit 0
    fi

    if [ -d /run/systemd/system ]; then
        exec systemctl --no-block start $(systemd-escape --template 
[email protected] $INTERFACE)
    fi

    local out=$(ps -C ifup ho args)
    if [ "${out%$INTERFACE*}" != "$out" ]; then
        mesg "Already ifup-ing interface $INTERFACE"
        exit 0
    fi

    wait_for_interface lo

    exec ifup --allow=hotplug $INTERFACE
}

net_ifdown() {
    check_program /sbin/ifdown

    # systemd will automatically ifdown the interface on device
    # removal by binding the instanced service to the network device
    if [ -d /run/systemd/system ]; then
        exit 0
    fi

    local out=$(ps -C ifdown ho args)
    if [ "${out%$INTERFACE*}" != "$out" ]; then
        mesg "Already ifdown-ing interface $INTERFACE"
        exit 0
    fi

    exec ifdown --allow=hotplug $INTERFACE
}

do_everything() {

case "$ACTION" in
    add)
    # these interfaces generate hotplug events *after* they are brought up
    case $INTERFACE in
        ppp*|ippp*|isdn*|plip*|lo|irda*|ipsec*)
        exit 0 ;;
    esac

    net_ifup
    ;;

    remove)
    # the pppd persist option may have been used, so it should not be killed
    case $INTERFACE in
        ppp*)
        exit 0 ;;
    esac

    net_ifdown
    ;;

    *)
    mesg "NET $ACTION event not supported"
    exit 1
    ;;
esac

}

# under systemd we don't do synchronous operations, so we can run in the
# foreground; we also need to, as forked children get killed right away under
# systemd
if [ -d /run/systemd/system ]; then
    do_everything
else
    # under sysvinit/upstart we need to fork as we start the long-running
    # "ifup". but there, forked processes won't get killed.
    # When udev_log="debug" stdout and stderr are pipes connected to udevd.
    # They need to be closed or udevd will wait for this process which will
    # deadlock with udevsettle until the timeout.
    exec > /dev/null 2> /dev/null
    do_everything &
fi
[Unit]
Description=ifup for %I
After=local-fs.target network-pre.target apparmor.service
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
DefaultDependencies=no
IgnoreOnIsolate=yes

[Service]
ExecStart=/bin/sh -ec 'ifup --allow=hotplug %I; ifquery --state %I'
ExecStop=/sbin/ifdown %I
RemainAfterExit=true
SUBSYSTEM=="net", ACTION=="add|remove", RUN+="ifupdown"

--- End Message ---
--- Begin Message ---
Source: ifupdown
Source-Version: 0.8.5

We believe that the bug you reported is fixed in the latest version of
ifupdown, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guus Sliepen <[email protected]> (supplier of updated ifupdown package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 02 Jan 2016 00:41:49 +0100
Source: ifupdown
Binary: ifupdown
Architecture: source amd64
Version: 0.8.5
Distribution: unstable
Urgency: medium
Maintainer: Guus Sliepen <[email protected]>
Changed-By: Guus Sliepen <[email protected]>
Description:
 ifupdown   - high level tools to configure network interfaces
Closes: 809169 809171
Changes:
 ifupdown (0.8.5) unstable; urgency=medium
 .
   [ Stéphane Graber ]
   * Allow setting the MTU and HWADDR on manual interfaces. Closes: #809169
 .
   [ Guus Sliepen ]
   * Remove Depends/Replaces/Breaks for ancient packages.
   * Move ifupdown related files from the systemd and udev packages to this
     package. Closes: #809171
Checksums-Sha1:
 db9f9a24e6da682c666d0ab802ae11d9ce9cff52 1536 ifupdown_0.8.5.dsc
 dcac5b7589dbfdf3936830a48ae507df4b40689d 70384 ifupdown_0.8.5.tar.xz
 5ce94acaf034cc2917a133fedd82f8588db89b85 59568 ifupdown-dbgsym_0.8.5_amd64.deb
 81138b3d1ba4fe98ec706084ac0dc320e0dcca00 71884 ifupdown_0.8.5_amd64.deb
Checksums-Sha256:
 fe1dd6dd3c645f14092967ad94f5d8eaf819fa141b0beff28277b350b4ad4d71 1536 
ifupdown_0.8.5.dsc
 2968caf0ed56b74a2f4fd031d7238560adf407b27617c443dcf87d92a56f87c6 70384 
ifupdown_0.8.5.tar.xz
 52bc8df092739a482f6d4410ac66ede01b10090228fda841c00011460da088bb 59568 
ifupdown-dbgsym_0.8.5_amd64.deb
 32364d896abe90acbf44b438c455b81cfaf32e655aef7a09e00c463609cfd32e 71884 
ifupdown_0.8.5_amd64.deb
Files:
 bb58fc6859260d56f5da91decabd34db 1536 admin important ifupdown_0.8.5.dsc
 3481ac8e6499c64d2a21038101225313 70384 admin important ifupdown_0.8.5.tar.xz
 2a1ce11462abb8da0843129af5baa4b6 59568 debug extra 
ifupdown-dbgsym_0.8.5_amd64.deb
 c7e0862a4b12b55df89af7364ad4410d 71884 admin important ifupdown_0.8.5_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJWhw8EAAoJED9JDeuHHvn69lgP/i3FWSdKEpU1S3mZfu+seUWL
fKcF4uUTBE4zmZshGBBgx4hvlLSaXPNsbzz3vtQHZFZ38rVW3T85vLWsACdY4T2F
4IOytIAmYrE198G1ABG8E5+KQ2Hacw2sP6vac06qFtwwhCZOeQpdk3xWtxReCHdr
HkGd/GMrneUSC/ErqXmUL3PEqjabElcg8LpUR51J9GENrKdKD0vVGwUSSKkTccpO
q4GEgNVDroF08CgcgxY0rIs0TXn6hGxLTZU6juHMjSpxmejH5UTSHSCUB3SSvvem
sTKa3BrWeIX4yqa99FNaQI69KA0GwusHDfemJpu1/UsEkWSvAHufeao57Fn4TzFo
KU5Wt8OtDOLa6tEBf2TfN4H/ZE4+FmDWG5XRpwu9pvd25xYsjBrnFTqdHZGVBH/W
Folao0BmpdH9WcZQujZmCHm41+vTW+5BH4moJdLD0kVGaxD8w307v1iTftS/KOSi
Cz3jtbDtZVSs+/xZ07odvYfoIpt/Pyj9OACrrE59tB3uhqNLGKaRC4q8R3tGglWO
2BiOfbH3Oext44mLkwoGGIp2BDsHyPvhRecxnrZ8K/K7dlJ0LjyeIy9K7+FZo1Bw
80tWN2V/n5HBDe01cpodFprVK7m3C8ku50Z5akIhsPeQNFv388BFd0CVWBZWn0kI
W7XZ5fbNHL/tqFUOfqs5
=mEAS
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to