From owner-freebsd-stable@FreeBSD.ORG Tue Dec 18 15:17:30 2007 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4022D16A417 for ; Tue, 18 Dec 2007 15:17:30 +0000 (UTC) (envelope-from lists@lozenetz.org) Received: from mail.webreality.org (mailserver.webreality.org [217.75.141.5]) by mx1.freebsd.org (Postfix) with ESMTP id CDFBA13C455 for ; Tue, 18 Dec 2007 15:17:28 +0000 (UTC) (envelope-from lists@lozenetz.org) Received: from [10.0.1.100] (unknown [87.121.18.230]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.webreality.org (Postfix) with ESMTP id 087CAFFEA96 for ; Tue, 18 Dec 2007 17:00:24 +0200 (EET) Message-ID: <4767E08C.2090803@lozenetz.org> Date: Tue, 18 Dec 2007 17:00:28 +0200 From: Anton - Valqk User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: stable@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-HostIT-MailScanner-Information: Please contact the ISP for more information X-HostIT-MailScanner: Found to be clean X-HostIT-MailScanner-From: lists@lozenetz.org Cc: Subject: jlogin.sh - a small nice jails helper! X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2007 15:17:30 -0000 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" ] && echo "No jail specified." && exit 1; jName=$1; jID=`jls | awk '{print $1,$3}'|grep $jName|awk '{print $1}'` jRealName=`jls | awk '{print $1,$3}'|grep $jName|awk '{print $2}'` [ -z "$jID" ] && echo "No such jail name $jName!" && exit 1; echo "Logging in to $jRealName" jexec $jID $loginSHELL -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.