thanks to all those who helped out.. and pointed very important info. to me.
mounted file systems.. and so on.. / /usr
here are some of the reasons:
Oh dear! Change roots shell back to /sbin/sh as
*immediately*. You'll be in trouble if you try to boot single user and
there's a problem with /usr if you don't.
Didn't you notice that /sbin/sh and /usr/bin/sh are different ?
burns>file /usr/bin/sh /sbin/sh
/usr/bin/sh: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, s
tripped
/sbin/sh: ELF 32-bit MSB executable SPARC Version 1, statically linked, st
ripped
<><>---------------------<><>
Another thing to keep in mind is that, generally, /usr tends to be
a different partition than the root partition. Meaning if you ever lose
/usr, you'll be completely hosed (if you lose the root partition you
have greater problems, but that's another story). A lot of people
just copy their favorite shell into /sbin assuming that it will solve
the above problem, however, most shells in /usr are dynamically linked
meaning, they *need* /usr/lib/lib*.so! so you're back to the original
problem. My advice is to never, repeat *NEVER* change root's shell
and in root's login files, test see if /usr is mounted that your
favorite shells exists and is executable and then exec it. Well, i'll
stop preaching now ;-)
thanks to:ramon@qed.com.mx sesharao@lsil.com hxktb0@svho1nfs_1.supervalu.com
whafiz@london.micrognosis.com tkld@cogsci.ed.ac.uk
dmick@pongo73.West.Sun.COM michaelj@burrito.insource.com
asola@s1.intelideas.com donf@brother.com bbyoung@amoco.com
rloftin@engsys.mc.xerox.com raju@hoho.ecologic.net
answer below from, dmick@pongo73:
stty erase
PATH=$PATH:/usr/ccs/bin:/usr/local/bin; export PATH
if [ `expr "$0" : '.*ksh'` = 0 ]
then
shell="bourne"
else
shell="korn"
fi
runlevel=`who -r | nawk '{print $3;}'`
echo "shell is $shell"
echo "runlevel is $runlevel"
if [ $runlevel = "3" -a $shell = "bourne" ]
then
EDITOR=vi ; export EDITOR
echo "starting /bin/ksh"
exec /bin/ksh
fi
thanks.. again all and also sun-managers@ra.mcs.anl.gov
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:15 CDT