[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [vga16fb] `dbootstrap' starts b&w until vt change.



>>>>> "Ben" == Ben Pfaff <pfaffben@msu.edu> writes:

    Ben> karlheg@bittersweet.inetarena.com (Karl M. Hegbloom) writes:

    >> I fixed it by having `busybox' (which acts as `init' via a hard link)
    >> do a vt switch as you suggest, when it finds out whether it's running
    >> on a machine with a standard Linux console or a serial console.  If
    >> it's not a serial console, it does the vt switch.
    >> 
    >> Where would be the best place in our standard boot sequence to do the
    >> similar?  Should there be an rcS.d script, or should `init' be
    >> patched?  I tend to think that an rcS.d script would be simplest and
    >> best, because `init' can be restarted without rebooting the machine.

    Ben> I see no reason to not simply make this a rcS.d script.

 I've reported a Bug against `sysvinit', with a script that calls
 `chvt' attached to it.

#!/bin/sh

# Performing a VT switch is a cheap way to reset the VGA palette.
# The boot logo uses a restricted color set; reset it to standard colors.

tty=$(tty)

# Not a serial console or pty.
if expr "$tty" : "/dev/tty[1-9]" >/dev/null; then
    if [ -f /proc/fb ]; then
	tty=${tty##/dev/tty}
	chvt 2
	chvt ${tty}
    fi
fi


Reply to: