[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: detecting serial console from a shell-script
manu%NetBSD.org@localhost (Emmanuel Dreyfus) writes:
>sysctl kern.consdev seems to give the answer. How reliable is it? Can I
>take for granted that this command will detect a serial console?
>/sbin/sysctl kern.consdev | egrep -q '= tty0[0-3]$' && echo "serial"
It may depend on the platform what is considered a serial device. But
since you asked about BIOS or serial you are probably looking only at
But I'm curious, what does this distinction give you? Either console
is a just 'a terminal'.
Michael van Elst
"A potential Snark may lurk in every tree."
Main Index |
Thread Index |