On 27/4/24 13:18, al3xu5 via Dng wrote:
> Nice... but... How should be the content of /etc/network/interfaces?
It's suggested in the README.md of libnetaid. Something like this will work:
iface eth0 inet dhcp
iface wlan0 inet dhcp
It's up to you to add other stanzas like allow-hotplug, auto, etc.
> I have some problems here (I suppose probably related to ifdown).
>
> What if I want /etc/network/interfaces define only the loopback interface
> (this, for example, to handle dhcp for eth0 directly by dhcpcd)?
If you only add stanzas for the loopback interface "lo", ifupdown will do nothing.
> Simple-netaid-gtk says 'Connected to eth0', but I cannot bring down eth0
> (the message is: 'ifdown: unknown interface eth0)...
Exactly. This is because you only have the loopback interface in your /etc/network/interfaces
> and running:
> $ sudo ubus call ering.netaid ifdown '{ "ifname": "eth0" , "tty": 2 }'
> apparently do noting (eth0 say up)...
For the same reason. On the other hand, using sudo in the ubus calls makes no sense because
they provide granted privileges without the need of root permissions, just as dbus does.
If you are root, run commands like:
# ip link set eth0 up
# ifup eth0
However, if you aren't root then you want to run commands like: