#!/usr/local/bin/bash # # bootjail script # # Zoidial, Inc. # Eric Thern eric@zoidial.com # June, 2001 # updated March 2002 # # # set this to the name of your network interface # NET_DEVICE=fxp1 # # path to the directory that has your IP address jailed directories # exclude trailing slash # # (not used) # PATH=/jail # $1 = IP addy # $2 = path # $3 = hostname # # THESE ARE NOT NEEDED! oh my god the havok these could cause! # # RUN FOR YOUR LIVES!@*!&(*@&!* # # /sbin/ifconfig $NET_DEVICE alias $1 netmask 255.255.255.255 # /sbin/mount -t procfs proc $2/proc # /usr/sbin/jail $2 $3 $1 /bin/sh /etc/rc echo "Jail $3 started in directory $2" /usr/bin/logger "Jail $3 started in directory $2 with IP address $1"