Replacing standard shell with Bash for root

Status
Not open for further replies.

panz

Guru
Joined
May 24, 2013
Messages
556
The title says all: I replaced the standard CLI shell with Bash. Does this affect FreeNAS' internal scripts?
 

DaPlumber

Patron
Joined
May 21, 2014
Messages
246
Um, me too and I haven't noticed any breakage so far.

If I did come across any scripting that didn't specify it's interpreter with a "#!" on the first line I would be filing a very snarky bug report that that's been a best practice since the late Paleolithic of UNIX computing.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
It's not the kind of thing I'd recommend...
 

DaPlumber

Patron
Joined
May 21, 2014
Messages
246
If the change was done through the GUI it must be good, right? :p:D
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
If the change was done through the GUI it must be good, right? :p:D

That's kind of my opinion.. personally I'd leave it at defaults just to be on the safe side though. ;)

Nothing stops you from running bash as an application and doing your stuff on that, right?
 

DaPlumber

Patron
Joined
May 21, 2014
Messages
246
I find your lack of slack disturbing.

An "su -" followed by an "exec bash"? That's way too many keystrokes on every login... o_O
 

c32767a

Patron
Joined
Dec 13, 2012
Messages
371
There was a time, which I remember with mixed feelings, when root's shell needed to be statically linked, else bad things would happen if you had problems getting /usr mounted.. :)
 

DaPlumber

Patron
Joined
May 21, 2014
Messages
246
C shells, C shells, written in C, Sure.
But the C shells that FreeBSD sells
are tee-cee-shells I'm sure.

Korn for me will always be the only usable shell on HP-UX 9000 systems, not some vaguely metal-ish band.

Yes, I remember when /usr had to be a separate filesystem because it was a separate disk all of about 50MB in some cases.

We had it rough... mutter... had to flush the buffer uphill both ways through the line noise... mutter... Damn kids! mutter... Get off my board!

Now, I feel old. :eek::p I'll bet I have UNIX systems sitting on the shelf that are older than most of the people on these forums. :rolleyes::cool:

I fear I have veered a little off topic.
 

panz

Guru
Joined
May 24, 2013
Messages
556
Thank for all the answers. If I roll back the Shell to the default one, how could I enter commands like this from a SSH (Putty) session?

for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
smartctl --xall /dev/da${i} | grep -i "Current Temperature" &
done

These commands work on Bash.
 

DaPlumber

Patron
Joined
May 21, 2014
Messages
246
After login use the command "exec bash" to replace the currently running shell with bash. I.e. when you exit the bash shell you will log out and whatever shell you were using when you logged in will no longer be consuming resources. If you want to put those command in a file as a script that should always be interpreted by bash put "#!/bin/bash" on the first line.
 

c32767a

Patron
Joined
Dec 13, 2012
Messages
371
C shells, C shells, written in C, Sure.
But the C shells that FreeBSD sells
are tee-cee-shells I'm sure.

Korn for me will always be the only usable shell on HP-UX 9000 systems, not some vaguely metal-ish band.

Yes, I remember when /usr had to be a separate filesystem because it was a separate disk all of about 50MB in some cases.

We had it rough... mutter... had to flush the buffer uphill both ways through the line noise... mutter... Damn kids! mutter... Get off my board!

Now, I feel old. :eek::p I'll bet I have UNIX systems sitting on the shelf that are older than most of the people on these forums. :rolleyes::cool:

I fear I have veered a little off topic.


Heh.. I feel it too..

We were never an HP shop. I'm grateful I never ended up in SVR4 land.. HPUX and AIX are dark and scary :)

I grew up in Sunos and Solaris.. I've even seen Solaris 1 and 2 source.. :)
 

panz

Guru
Joined
May 24, 2013
Messages
556
After login use the command "exec bash" to replace the currently running shell with bash. I.e. when you exit the bash shell you will log out and whatever shell you were using when you logged in will no longer be consuming resources. If you want to put those command in a file as a script that should always be interpreted by bash put "#!/bin/bash" on the first line.

Just reverted to default shell (csh); "exec bash" works perfectly ;) thank you! (BTW, just for information, the shell that we can access from FreeNAS' web interface has Bash as default :D
 

DaPlumber

Patron
Joined
May 21, 2014
Messages
246
Huh, that I didn't check that should tell you everything you need to know about my fondness for using web-based terminal windows. Ssh, tmux, and bash: I'm a happy camper with FreeNAS in that regard... :D
 
Status
Not open for further replies.
Top