fix(deploy): keep existing manual TUN passthrough on reused CTs (#6)
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.
This commit is contained in:
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/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:]])'
|
||||
}
|
||||
Reference in New Issue
Block a user