#!/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:]])' }