The officially official Devuan Forum!

You are not logged in.

#1 Re: Hardware & System Configuration » [SOLVED] allow-hotplug not working properly on ifupdown » 2023-11-22 11:13:20

tf
Danielsan wrote:
tf wrote:

Are you using IWD?

Hi,
I don't use IWD only interfaces config file.

Did you remove allow-hotplug?

Both auto and allow-hotplug, should I restore auto instead?

Did you make sure not to use IWD's built-in DHCP client?

IWD is not installed!

Did you modify /etc/netplug/netplug?

Yes I did, using the configuration you shared!

I don't actually need the wifi I need it for the eth0, but I guess that if doesn't work is the same for the others, isn't it?

Thanks!

This config is designed to specifically work with IWD. It should work like the original script if you are using ethernet (I made it detect if the interface is wireless or not.)

#2 Re: Hardware & System Configuration » [SOLVED] allow-hotplug not working properly on ifupdown » 2023-10-31 19:51:23

tf
Danielsan wrote:

Did you customize the default script?

My WiFi dongle is stuck in a endless loop with your script...

Are you using IWD?
Did you remove allow-hotplug?
Did you make sure not to use IWD's built-in DHCP client?

Did you modify /etc/netplug/netplug?

#3 Re: Hardware & System Configuration » [SOLVED] allow-hotplug not working properly on ifupdown » 2023-10-23 14:05:59

tf
Danielsan wrote:
tf wrote:

I fixed this by using ifplugd and not using ifupdown's built-in allow-hotplug.

Can you explain a little bit better what you did?

Thanks!

Remove all allow-hotplug and auto lines (except for lo) from /etc/network/interfaces, like this:

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
iface eth0 inet dhcp

iface usb0 inet dhcp

iface wlan0 inet dhcp

Replace /etc/netplug/netplug with all of this:

#!/bin/sh
#
# netplug - policy agent for netplugd
#
# Copyright 2003 Key Research, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2, as
# published by the Free Software Foundation.  You are forbidden from
# redistributing or modifying it under the terms of any other license,
# including other versions of the GNU General Public License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.

PATH=/usr/bin:/bin:/usr/sbin:/sbin
export PATH

dev="$1"
action="$2"

case "$action" in
in)
    if [ -x /sbin/ifup ]; then
        exec /sbin/ifup "$dev"
    else
        echo "Please teach me how to plug in an interface!" 1>&2
        exit 1
    fi
    ;;
out)
    if [ -x /sbin/ifdown ]; then
        # At least on Fedora Core 1, the call to ip addr flush infloops
        # /sbin/ifdown $dev && exec /sbin/ip addr flush $dev
        if ! [ -d "/sys/class/net/$dev/wireless" ]; then
                exec /sbin/ifdown "$dev"
        else
                # Do the same thing as ifdown (kill dhcp process, etc.) without putting the interface down
                # Putting the interface fully down will break IWD.
                eval "$(ifdown -n -f "$dev" 2>&1 | tail -n +2 | tac | tail -n +4 | tac | tr '\n' ';' | head -c -1)" && \
                echo > "/var/run/network/ifstate.$dev"
        fi
    else
        echo "Please teach me how to unplug an interface!" 1>&2
        exit 1
    fi
    ;;
probe)
    exec test -d "/sys/class/net/$dev" >/dev/null 2>&1
    ;;
*)
    echo "I have been called with a funny action of '$action'!" 1>&2
    exit 1
    ;;
esac

And replace /etc/netplug/netplugd.conf with this:

eth*
wlan*
usb*

#5 Re: Hardware & System Configuration » [SOLVED] allow-hotplug not working properly on ifupdown » 2023-10-21 15:18:43

tf
Danielsan wrote:
tf wrote:

I fixed this by using ifplugd and not using ifupdown's built-in allow-hotplug.

Did you read where ifplugd come from?

apt show ifplugd
Package: ifplugd
Version: 0.28-19.5
Priority: optional
Section: net
Maintainer: Walter Franzini <walter.franzini@gmail.com>
Installed-Size: 222 kB
Depends: libc6 (>= 2.15), libdaemon0 (>= 0.10), debconf (>= 0.5) | debconf-2.0, lsb-base (>= 3.0-6)
Recommends: ifupdown (>= 0.6.4-4.2)
Suggests: wpasupplicant
Homepage: http://0pointer.de/lennart/projects/ifplugd/
Tag: hardware::laptop, implemented-in::c, interface::daemon,
 network::configuration, protocol::ethernet, role::program,
 scope::application, use::configuring, use::monitor
Download-Size: 65.5 kB
APT-Sources: http://deb.devuan.org/merged daedalus/main amd64 Packages
Description: configuration daemon for ethernet devices

😱

Ifplugd was the only workaround to my problem that I found that didn't involve using NetworkManager.

#6 Re: Hardware & System Configuration » [SOLVED] allow-hotplug not working properly on ifupdown » 2023-10-21 11:46:08

tf

I fixed this by using ifplugd and not using ifupdown's built-in allow-hotplug.

#7 Re: Hardware & System Configuration » [SOLVED] allow-hotplug not working properly on ifupdown » 2023-10-16 13:48:28

tf
Danielsan wrote:

You should also add as first line auto wlan0

That would make it wait till DHCP has finished which breaks my networking setup. allow-hotplug used to make sure it didn't wait for DHCP but that seems to no longer be the case.

#8 Hardware & System Configuration » [SOLVED] allow-hotplug not working properly on ifupdown » 2023-10-14 13:40:34

tf
Replies: 18

Hello everyone,

Last week, I upgraded my laptop from Devuan 4 to Devuan 5. However, next boot, I can see it starting DHCP and I have to wait for it. However, since it doesn't let other services run, this broke my whole wifi setup. (I use IWD with ifupdown, it runs ifupdown first and then iwd).

Is there a way to fix this?

Here is my /etc/network/interfaces file:

source /etc/network/interfaces.d/*

allow-hotplug wlan0
iface wlan0 inet dhcp

Best regards,
tf

Board footer

Forum Software