#!/usr/local/bin/bash # # startjail script # (for Zoidial Publishing) # # zoidial, -june, 2001 # until test do echo "You are running startjail with IP address of: $1 and hostname: $2" echo "Proceed with startjail script? (y/n)" read test case $test in y) ifconfig xl0 alias $1 netmask 255.255.255.255 # commented out, don't need this (security hole) # mount -t procfs proc /usr/home/$1/proc jail /usr/home/$1 $2 $1 /bin/sh /etc/rc echo "Jail started on $1" exit 0 ;; n) echo "Aborting" exit 0 ;; esac done