File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,10 +82,21 @@ echo "nameserver ${GUEST_DNS}" > /etc/resolv.conf
8282
8383echo "init: network configured - IP: ${GUEST_IP}" > /dev/kmsg
8484
85+ # Set up /dev symlinks for bash process substitution (Docker compatibility)
86+ echo "init: setting up /dev symlinks" > /dev/kmsg
87+ ln -sf /proc/self/fd /dev/fd 2>/dev/null || true
88+ ln -sf /proc/self/fd/0 /dev/stdin 2>/dev/null || true
89+ ln -sf /proc/self/fd/1 /dev/stdout 2>/dev/null || true
90+ ln -sf /proc/self/fd/2 /dev/stderr 2>/dev/null || true
91+
8592# Set PATH for proper binary resolution
8693export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
8794export HOME='/root'
8895
96+ # Set up signal handlers for graceful shutdown
97+ trap 'echo "init: received SIGTERM, shutting down..." > /dev/kmsg; exit 0' TERM
98+ trap 'echo "init: received SIGINT, shutting down..." > /dev/kmsg; exit 0' INT
99+
89100echo "init: starting SSH server" > /dev/kmsg
90101
91102# Create SSH directory
You can’t perform that action at this time.
0 commit comments