Re: jlogin.sh - a small nice jails helper!

2007-12-22 Thread Anton - Valqk
Hi there, your script didn't had what I wanted for the ps, that's why I wrote simpler one for myself, that's do the job for me - finds a string from ps axu from any jail :) here it is, hopes it's useful (quick 15mins hack script). #!/bin/sh #list all jails processes #$1 - jid - jail pattern || AL

Re: jlogin.sh - a small nice jails helper!

2007-12-21 Thread Oliver Fromme
Miroslav Lachman wrote: > Oliver Fromme wrote: > > if [ -z "$SHELL" -o ! -x "$jail_path/$SHELL" ]; then > > login_shell="$SHELL" > > else > > login_shell="/bin/sh" > > fi Ian Smith brought to my attention that I got the logic reversed in the if statement.

Re: jlogin.sh - a small nice jails helper!

2007-12-20 Thread Miroslav Lachman
Oliver Fromme wrote: Miroslav Lachman wrote: > It is nice idea, but I think you should have a better scripting style ;) Yes, it almost looked like perl. :-) May I suggest a few further improvements? > login_shell="/bin/tcsh" I certainly wouldn't want tcsh. How about looking at $SHELL, and

Re: jlogin.sh - a small nice jails helper!

2007-12-20 Thread Oliver Fromme
Miroslav Lachman wrote: > It is nice idea, but I think you should have a better scripting style ;) Yes, it almost looked like perl. :-) May I suggest a few further improvements? > login_shell="/bin/tcsh" I certainly wouldn't want tcsh. How about looking at $SHELL, and if it doesn't exist, th

Re: jlogin.sh - a small nice jails helper!

2007-12-18 Thread Miroslav Lachman
Anton - Valqk wrote: Because I'm lazy and love the scripts, I wrote a nice small script that matches a jailname and do a jexec JAILPID SHELL so I can login fast to my jails. According to me, there should be such tool! Hopes something like this goes to STABLE! here it is #!/bin/sh loginSHEL

jlogin.sh - a small nice jails helper!

2007-12-18 Thread Anton - Valqk
Because I'm lazy and love the scripts, I wrote a nice small script that matches a jailname and do a jexec JAILPID SHELL so I can login fast to my jails. According to me, there should be such tool! Hopes something like this goes to STABLE! here it is #!/bin/sh loginSHELL="/bin/tcsh" [ -z "$1"