[luau] Changing shells

Jon Reynolds jonr at destar.net
Thu Jul 11 16:55:01 PDT 2002


OK, you guys always give me censory overload :) How about this instead, I
need to make the command that I put in /etc/rc.local to execute at boot
time. In csh it cannot but in sh it can, how do I make just this one command
execute at boot time under a different shell that wont give me dreaded
"ambiguous output" message? This is the offending command:
'/usr/local/bin/tcpserver -R -x/var/qmail.control/relays.cdb -u5001 -g5000 0
smtp /var/qmail/bin/qmail-smtpd 2>&1 | /var/qmail/bin/splogger &' As you can
see having to type this in everytime it reboots is wearing on me quickly. I
think what is causing my problem is the pipe(|) but I'm no expert *nix type
guy to figure out a solution.

Jon

-----Original Message-----
From: luau-admin at videl.ics.hawaii.edu
[mailto:luau-admin at videl.ics.hawaii.edu]On Behalf Of Carl Tucker
Sent: Thursday, July 11, 2002 6:04 PM
To: luau at videl.ics.hawaii.edu
Subject: Re: [luau] Changing shells


On Thu, Jul 11, 2002 at 05:56:18PM -0500, MonMotha wrote:
> Changing the default shell on unix (linux, bsd, commercial unixes, etc)
> generally means changing the link /bin/sh to whatever you want.  In this
> case, /bin/sh is probably a symlink to /bin/csh.  To change to bash,
> link it to /bin/bash.

Aagh!  No, don't do that.  /bin/sh must be a bourne-family shell,
preferably sh itself (for speed).  This is a POSIX mandated shell
that many programs and utilities depend on to work as expected.

FreeBSD has csh as the default shell for root, and an additional
UID 0 account called toor.  The toor account is the one you should
use if you want to use a different shell than csh.  You can change
it with chsh(1) or vipw(8).

Nothing prevents you from changing root's shell, of course, but
it can come back to bite you.  For instance, on my system, bash
is /usr/local/bin/bash.  What if my system crashes and I have to
boot single user with /usr unmounted.  Uh oh, no shell.

Root's shell should be on the root partition, and be statically
linked - the other kicker.  If the shared libraries your shell
is linked against are in /usr/include, same problem if /usr
is unmounted.

For more info, see /usr/share/doc/faq/index.html , section 7.12
and /usr/share/doc/handbook/index.html , section 3.7

--
Carl Tucker
cft at panix.com
flestrin at worldnet.att.net
tuckercl at phnsy.navy.mil
_______________________________________________
LUAU mailing list
LUAU at videl.ics.hawaii.edu
http://videl.ics.hawaii.edu/mailman/listinfo/luau




More information about the LUAU mailing list