[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

jexec script you might find useful


If, like me, your jails are named XX.hostname where hostname is the hostname of the host machine, and if, like me, you use ezjail and find the jid and the number of the jail don't always correspond, you might find this script useful:


JID=`/usr/sbin/jls | /usr/bin/grep $JAILNO.$HOSTNAME | /usr/bin/awk '{ print $1 }'`

/usr/sbin/jexec $JID tcsh

I put this in my path and call it jcon. So now I just type jcon 09 and it connects me to jail number 9, no matter whether jail number 9 has jid 9 or 64. ( I number my jails.)

Hope this is useful to you.

george donnelly ~ High Speed Rails inc. ~ highspeedrails.com
Managed Open-Source Hosting ~ Plone Hosting ~ Full Support
Yahoo/AIM: highspeedrails   ~   Voice: 1-800-969-1452