[illumos-Developer] more & less

Ben Taylor bentaylor.solx86 at gmail.com
Fri Dec 17 13:43:27 PST 2010


On Fri, Dec 17, 2010 at 8:40 AM, Joerg Schilling
<Joerg.Schilling at fokus.fraunhofer.de> wrote:
> Ben Taylor <bentaylor.solx86 at gmail.com> wrote:
>
>> I remember having a discussion with Jürgen Keil  a couple of years back
>> on this exact issue, as I had put less into my mini-root when I was
>> debugging some problematic Solaris 10 installs.
>>
>> Jürgen said the issue was that stderr was not correctly set for single user
>> mode, and required to exec the shell with appropriate redirection.  I'll see
>> if I can find it in my archives.
>
> I remember that previosu Solaris releases did not correctly set up the tty,
> resulting in blocked tty-signals.
>
> The main difference between more and less is that more works without TERM to be
> set but less does not. This is because less uses the tty in an agressive way
> while more is very conservative about what features to use.

Yes, that's it.  It's been a while since I thought about this.

I found Jurgen's comments.

A bug in the /sbin/sulogin script on the install miniroot,
when Solaris x86 started to use newboot: /sbin/sulogin
opens the stderr file descriptor in write only mode, but
interactive applications (e.g. more) in a unix environment
expect that stdin, stdout and stderr are opened in read/write
mode.

Workaround is to run the following command on in the single
user shell started from install media, before trying to use
the more command:

exec 2<>/dev/console

See also:
http://www.opensolaris.org/jive/thread.jspa?messageID=2650

Should be fixed in recent OpenSolaris releases (> snv_55 ?).
(But TERM still isn't set)



More information about the Developer mailing list