Subject: Re: Root .profile
To: NetBSD-current Users <current-users@netbsd.org>
From: Greg A. Woods <woods@most.weird.com>
List: current-users
Date: 04/11/1999 22:46:08
[ On Sunday, April 11, 1999 at 18:09:27 (-0700), Brian D Chase wrote: ]
> Subject: Re: Root .profile
>
> On Sun, 11 Apr 1999, Curt Sampson wrote:
> > On Sun, 11 Apr 1999, Brian D Chase wrote:
>
> > > It would likely be wise to include logic
> > > to determine '$ ' vs '# ' prompts in case a normal user with /bin/sh
> > > decides to not have a $HOME/.profile
> >
> > You don't need to do that in the profile; the shell does # for root
> > and $ for non-root automatically.
>
> How ideal. :-)
OK, then USE IT! ;-)
> I don't really mind the inclusion of the hostname in the
> prompt though. It can often be helpful.
This is all you need then:
PS1="${HOST:=`/bin/hostname -s`} $PS1"
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>