fix and test #20

Merged
nicolas.boufideline merged 7 commits from feature-15 into main 2026-03-31 20:03:00 +00:00
Showing only changes of commit deac1afe9f - Show all commits

f-15: script: add script for running dhcp in netns

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
GnomeZworc 2026-03-30 23:21:27 +02:00
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632

View file

@ -0,0 +1,21 @@
#!/bin/bash
set -e
# Expects one argument: netns_bridge (e.g. vpc-00003_br-00002 or vpc1_br0)
arg="$1"
NETNS="${arg%%_*}"
BRIDGE="${arg#*_}"
echo "start dnsmasq ${NETNS} ${BRIDGE}"
exec ip netns exec "${NETNS}" \
dnsmasq \
--no-daemon \
--interface="${BRIDGE}" \
--bind-interfaces \
--pid-file="/run/dnsmasq-$arg.pid" \
--conf-file="/etc/dnsmasq.d/$arg.conf" \
--no-hosts \
--no-resolv \
--log-facility="/var/log/dnsmasq-$arg.log" \
--no-daemon -p0