Jürgen Keil wrote:
>
> CR 6342722 ("single user shell sort of busted" ? Not sure, this bug
> isn't visible on b.o.o.).
>
> In snv_75a, more works OK when starting a single user shell from
> the installation media.
>
> In snv_75a, the miniroot /sbin/sulogin shell script contains this line:
>
> exec 0<> /dev/console 1>&0 2>&0
>
> The miniroot /sbin/sulogin from snv_75a has SCCS ID
> "@(#)sulogin.sh 1.5". Has that changed for snv_77?
>
>
> [*]
> http://mail.opensolaris.org/pipermail/opensolaris-bugs/2005-June/000084.html
>
>
On an only slightly related note,
How can I tell from a script (script library actually - included with
'source' or '.') whether a fd (say 3) is already open and setup?
I want to send messages from my script to fd 3 (basically I want to
create a 'stddbg' for debugging messages,) so that users running the
command, or the script that included the library can redirect these
messages without affecting stdout or stderr. But if the script or user
doesn't direct fd 3 to somewhere I get errors left and right. In that
case I'd like the library script to redirect 3 to stderr. But if it
does, then any redirection the user or parent script did is lost.
So far I've come up with this:
if ! /bin/echo -n 1>&3; then
exec 3>&2
fi 2>/dev/null
Is this portable? Is there a better way?
I guess on solaris I could use pfiles, but is that portable?
-Kyle
_______________________________________________
opensolaris-discuss mailing list
[email protected]