devuan fixes
This commit is contained in:
parent
edac4a2293
commit
abb15a6ec8
@ -902,7 +902,7 @@ EOF
|
|||||||
sysvinit)
|
sysvinit)
|
||||||
# Devuan/older systems - modify inittab for auto-login
|
# Devuan/older systems - modify inittab for auto-login
|
||||||
# Devuan 5 (daedalus) uses SysVinit with various inittab formats
|
# Devuan 5 (daedalus) uses SysVinit with various inittab formats
|
||||||
# CRITICAL: LXC uses /dev/console, NOT tty1! pct console connects to console device
|
# LXC can use /dev/console OR /dev/tty1 depending on how pct console connects
|
||||||
if [[ -f /etc/inittab ]]; then
|
if [[ -f /etc/inittab ]]; then
|
||||||
# Backup original inittab
|
# Backup original inittab
|
||||||
cp /etc/inittab /etc/inittab.bak 2>/dev/null || true
|
cp /etc/inittab /etc/inittab.bak 2>/dev/null || true
|
||||||
@ -921,10 +921,12 @@ EOF
|
|||||||
echo "# LXC console autologin (added by community-scripts)" >>/etc/inittab
|
echo "# LXC console autologin (added by community-scripts)" >>/etc/inittab
|
||||||
echo "co:2345:respawn:/sbin/agetty --autologin root --noclear console 115200 linux" >>/etc/inittab
|
echo "co:2345:respawn:/sbin/agetty --autologin root --noclear console 115200 linux" >>/etc/inittab
|
||||||
|
|
||||||
# Force a reload of inittab and respawn console getty
|
# Force a reload of inittab and respawn ALL getty processes
|
||||||
# Kill existing getty on console to force respawn with new settings
|
# Kill ALL getty processes to force respawn with new autologin settings
|
||||||
pkill -9 -f 'getty.*console' &>/dev/null || true
|
pkill -9 -f '[ag]etty' &>/dev/null || true
|
||||||
pkill -9 -f 'agetty.*console' &>/dev/null || true
|
|
||||||
|
# Small delay to let init notice the dead processes
|
||||||
|
sleep 1
|
||||||
|
|
||||||
# Reload inittab - try multiple methods
|
# Reload inittab - try multiple methods
|
||||||
telinit q &>/dev/null || init q &>/dev/null || kill -HUP 1 &>/dev/null || true
|
telinit q &>/dev/null || init q &>/dev/null || kill -HUP 1 &>/dev/null || true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user