#!/bin/bash # Cisco VPN Docker Init Script # Unmounts Docker's read-only bind mounts to allow VPN to modify DNS settings # Backup current DNS config cp /etc/resolv.conf /tmp/resolv.conf.bak 2>/dev/null || true cp /etc/hosts /tmp/hosts.bak 2>/dev/null || true # Unmount Docker's bind mounts (this is the key fix!) umount /etc/resolv.conf 2>/dev/null || true umount /etc/hosts 2>/dev/null || true # Restore DNS config as regular files cat /tmp/resolv.conf.bak > /etc/resolv.conf 2>/dev/null || echo "nameserver 8.8.8.8" > /etc/resolv.conf cat /tmp/hosts.bak > /etc/hosts 2>/dev/null || echo "127.0.0.1 localhost" > /etc/hosts # Start systemd exec /sbin/init