Return to jshell.sh CVS log | Up to [Paefchen] / home / as / scripts |
Hello My Home ;)
#!/bin/sh # $Paefchen: home/as/scripts/jshell.sh,v 1.1 2008/01/07 06:03:06 as Exp $ if [ $# -ne 1 ] then echo "usage $0: <jail-name>" exit 1 fi if [ -r /etc/defaults/rc.conf ] then . /etc/defaults/rc.conf source_rc_confs elif [ -r /etc/rc.conf ] then . /etc/rc.conf fi eval jip=\"\$jail_${1}_ip\" if [ -z "$jip" ] then echo "error: jail $1 not found" exit 1 fi jid=$(jls | awk -v ip=$jip '$2 == ip {print $1}') if [ -z "$jid" ] then echo "error: jail not running?" exit 1 fi jexec $jid $SHELL