create-ct.sh only recognised devN passthrough and added dev0 on top of a manual lxc.mount.entry for /dev/net/tun (left by earlier Tailscale setups), so the CT failed to start in the autodev hook (EEXIST). Detection now lives in ct-config.sh with a regression test.
8 lines
403 B
Bash
Executable File
8 lines
403 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Input: pct config output. True if /dev/net/tun already reaches the CT, either as a
|
|
# devN passthrough or as a manual lxc.mount.entry (e.g. an earlier Tailscale setup).
|
|
# Adding dev0 on top of a manual entry makes the CT fail to start (autodev hook, EEXIST).
|
|
has_tun_passthrough() {
|
|
grep -Eq '^(dev[0-9]+: (path=)?/dev/net/tun(,|$)|lxc\.mount\.entry: */dev/net/tun[[:space:]])'
|
|
}
|