Minor bugs in the sample script for ns-routing

Isaac Nickaein nickaein.i at gmail.com
Sat Feb 8 06:01:21 CET 2020


The sample script provided at "Routing and Network Namespace
Intergration" page seems to have a few bugs, at least on Ubuntu 19.10:

1. The execi command seems to have an extra "exec" at the beginning. Instead of:

exec ip netns exec physical sudo -E -u \#${SUDO_UID:-$(id -u)} -g
\#${SUDO_GID:-$(id -g)} -- "$@"

It should say:

ip netns exec physical sudo -E -u \#${SUDO_UID:-$(id -u)} -g
\#${SUDO_GID:-$(id -g)} -- "$@"


2. The "shift" command should be moved into "execi" function.

3. dhcpd seems to be replaced by dhclient. It would be nice if the
script set it (and other configurations) as a variable, e.g. to make
it easier for user to adopt the script:

DHCP_DAEMON=dhcpd
WG_IFACE=wgvpn0
WLAN_IFACE=wlan0
WLAN_PHY=phy0


More information about the WireGuard mailing list