Date: Fri, 21 Dec 2007 11:28:05 +0100 (CET) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-stable@FreeBSD.ORG, 000.fbsd@quip.cz Subject: Re: jlogin.sh - a small nice jails helper! Message-ID: <200712211028.lBLAS5T4099674@lurza.secnetix.de> In-Reply-To: <476AC0D7.7090402@quip.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
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;}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712211028.lBLAS5T4099674>