DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
Old 11th May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

I'd reckon a simple test and exec in the initialization files would work for changing roots shell when it's safe to and continuing otherwise.


Under bourne it would probably look some thing like:
Code:
if [ -x /usr/local/bin/foosh ]; then
        exec /usr/local/bin/foosh
else
        echo 'WARNING: foosh not available!'
fi
I never learned how to script the C-Shell, only POSIX-based BourneShell but I'd expect some thing similar is possible in csh/tcsh.


footnote:

As long as it has line editing, redirection, and pipes, I could care less which shell root uses. So I've never bothered to change roots shell on any of my systems ^_^
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.

Last edited by TerryP; 11th May 2008 at 10:42 PM.
Reply With Quote
Old 12th May 2008
mtx's Avatar
mtx mtx is offline
Real Name: Valentin Bud
Fdisk Soldier
 
Join Date: May 2008
Location: RO/TM
Posts: 79
Thanked 5 Times in 3 Posts
Default

TerryP you have read my mind . Once i have changed the users default shell to bash. Updating bash remotely crashed at some point and couldn't log in anymore.
It was easy to recover because i had physical access to the box but that thought me to use the default shell and use the code you posted in the defaults shell dot file to change it at login.

all the best,
v
__________________
Stop! think! ... the problem is somewhere between the monitor and chair...
"First they ignore you, then they laugh at you, then they fight you, then you win." Gandhi
links: spreadbsd syk
Reply With Quote
Reply

Tags
terminals

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: Encoding // Pure Terminal // Virtual Terminal vermaden Guides 1 25th June 2010 08:02 AM
Manpage colorization on the terminal JMJ_coder NetBSD General 2 17th February 2009 09:17 PM
netbsd terminal error jaideep_jdof NetBSD General 1 22nd November 2008 12:50 AM
Favorite Terminal Emulator JMJ_coder General software and network 23 5th November 2008 06:30 PM
terminal darken FreeBSD General 8 18th July 2008 07:12 PM


All times are GMT. The time now is 01:22 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick