Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Dec 2007 17:00:28 +0200
From:      Anton - Valqk <lists@lozenetz.org>
To:        stable@freebsd.org
Subject:   jlogin.sh - a small nice jails helper!
Message-ID:  <4767E08C.2090803@lozenetz.org>

next in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4767E08C.2090803>