You are not logged in.

#1 2010-12-12 11:10:38

tuxfusion
Member
Registered: 2007-12-31
Posts: 98

Show shutdown messages after X closed, started with rc.local method

Greetings,

I need a bullet proof method on switching to the correct tty? after I killed my X, which I load with something like this :

#/etc/rc.local
/bin/su <user> -l -c "/bin/bash --login -c xinit >/dev/null 2>&1" &

I do have these ttys defined in inittab :

# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 38400 tty3 linux

Now during shutdown/reboot , with "/sbin/shutdown"  I can manually switch to tty4 , CTL+ALT+F4 , and see shutdown messages, whenever
I try to script this I see a black screen only.

I tried to set chvt 4 into /etc/rc.shutdown , /etc/rc.local.shutdown  and in /etc/rc.local right after xinit like :

(/bin/su <user> -l -c "/bin/bash --login -c xinit >/dev/null 2>&1" && chvt 4 ) &

or

/bin/su <user> -l -c "/bin/bash --login -c xinit >/dev/null 2>&1"
chvt 4

Found many references to this problem and no solution sadly. I'm using quick-init btw.

Offline

Board footer

Powered by FluxBB