1*41fbaed0Stron# Setup chroot jail for NeXT, NEXTSTEP3. 2*41fbaed0Stron# Some remarks to the NEXTSTEP3 jail apply: 3*41fbaed0Stron# syslog: 4*41fbaed0Stron# Logging with syslog(3) uses a sendto ("/dev/log"). For this to work in 5*41fbaed0Stron# the jail, ${POSTFIX_DIR}/dev/log must be a hard link to /dev/log. This 6*41fbaed0Stron# fails if /usr/spool/postfix is on another filesystem, and consequently, 7*41fbaed0Stron# running chrooted will not be possible, unless you like to run your mail 8*41fbaed0Stron# system without logging (not). 9*41fbaed0Stron# 10*41fbaed0Stron# For this trick to work, the following should be run at every reboot, 11*41fbaed0Stron# preferably from /etc/rc, after syslog has been started (and given time 12*41fbaed0Stron# to create /dev/log): 13*41fbaed0Stron# POSTFIX_DIR=/usr/spool/postfix 14*41fbaed0Stron# rm ${POSTFIX_DIR}/dev/log 15*41fbaed0Stron# ln /dev/log ${POSTFIX_DIR}/dev/log 16*41fbaed0Stron 17*41fbaed0Stronset -e 18*41fbaed0Stron 19*41fbaed0Stronumask 022 20*41fbaed0Stron 21*41fbaed0StronPOSTFIX_DIR=${POSTFIX_DIR-/usr/spool/postfix} 22*41fbaed0Stron 23*41fbaed0Stroncd ${POSTFIX_DIR} 24*41fbaed0Stron 25*41fbaed0Stron# If this fails, running chrooted will be useless. 26*41fbaed0Stronmkdir dev 27*41fbaed0Stronln /dev/log dev 28*41fbaed0Stron 29*41fbaed0Stronmkdir etc etc/zoneinfo 30*41fbaed0Stroncp /etc/zoneinfo/localtime etc/zoneinfo 31*41fbaed0Stroncp /etc/resolv.conf etc 32