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