two/scripts/run-dnsmasq-in-netns.sh
GnomeZworc f90514a5dc
f-33: dnsmasq: remove duplicated --no-daemon flag
Le drapeau était passé deux fois, en tête et en fin de ligne de commande.
Sans effet, mais gênant à la lecture.

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-08-25 21:42:08 +02:00

21 lines
522 B
Bash

#!/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 \
--interface="${BRIDGE}" \
--bind-interfaces \
--pid-file="/run/dnsmasq-$arg.pid" \
--dhcp-leasefile="/run/dnsmasq-$arg.leases" \
--conf-file="/etc/dnsmasq.d/$arg.conf" \
--no-hosts \
--no-resolv \
--log-facility="/var/log/dnsmasq-$arg.log" \
--no-daemon -p0