jlogin.sh - a small nice jails helper!
Anton - Valqk
lists at lozenetz.org
Tue Dec 18 07:17:30 PST 2007
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.
More information about the freebsd-stable
mailing list