Re: console-setup for FreeBSD
Wiadomość napisana przez Cyril Brulebois w dniu 2011-03-09, o godz. 14:36:
>> Is it possible to detect reliably whether a script executes on the
>> console or in X Window? For Linux I've used a code like this:
>> case `readlink /proc/self/fd/2` in
>> echo We are not on the Linux console, the console is left unconfigured.
>> exit 0
> (I think I've mentioned it can't work on GNU/kFreeBSD, there's no fd/
> directory in the linprocfs compatiblity layer.)
Not sure about the Debian userland, but the standard FreeBSD way
would be to use tty(1):
If you cut off my head, what would I say? Me and my head, or me and my body?