jlogin.sh - a small nice jails helper!

Oliver Fromme olli at lurza.secnetix.de
Fri Dec 21 02:28:14 PST 2007


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.  He suggested to reverse
(i.e. undo) the negation, which is much better.
Thanks Ian!

     if [ -n "$SHELL" -a -x "$jail_path/$SHELL" ]; then
             login_shell="$SHELL"
     else
             login_shell="/bin/sh"
     fi

 > I am using your jps in slightly modified version ;)
 > [...]
 > echo "=============================="
 > echo " summary for JID $sum_jid / $jname"

That seems to be useful indeed.  I'll have a closer look
and possibly integrate it back into my jps.  Thanks!

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

PI:
int f[9814],b,c=9814,g,i;long a=1e4,d,e,h;
main(){for(;b=c,c-=14;i=printf("%04d",e+d/a),e=d%a)
while(g=--b*2)d=h*b+a*(i?f[b]:a/5),h=d/--g,f[b]=d%g;}


More information about the freebsd-stable mailing list