summaryrefslogtreecommitdiff
path: root/etc/rc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-06-03 16:04:09 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-06-03 16:04:09 +0000
commitfb99f1565f504b10dfd4c2ca1d2e4ae4883a16f4 (patch)
tree1cfe8241adf0f4658e324ecfe2e542e563583921 /etc/rc
parent4c14b2c29860df694faf6f4d246c9f84d78980e7 (diff)
Add named_user and named_chroot variables to simplify chroot'd named
setup.
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc14
1 files changed, 12 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index d452452ca15..c7ea309e876 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.73 1998/05/14 23:58:01 millert Exp $
+# $OpenBSD: rc,v 1.74 1998/06/03 16:04:07 millert Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -85,11 +85,21 @@ rm -f /var/spool/uucp/STST/*
echo 'starting system logger'
rm -f /dev/log
+if [ "X${named_chroot}" != "X" -a "X${named_chroot}" != X"NO" ]; then
+ rm -f ${named_chroot}/dev/log
+ syslogd_flags="${syslogd_flags} -a ${named_chroot}/dev/log"
+fi
syslogd ${syslogd_flags}
-# $named_flags is imported from /etc/rc.conf;
+# $named_flags, $named_user, and $named_chroot are imported from /etc/rc.conf;
# if $named_flags != NO, named is run.
if [ "X${named_flags}" != X"NO" ]; then
+ if [ "X${named_user}" != "X" -a "X${named_user}" != X"root" ]; then
+ named_flags="-u ${named_user} ${named_flags}"
+ fi
+ if [ "X${named_chroot}" != "X" -a "X${named_chroot}" != X"NO" ]; then
+ named_flags="-t ${named_chroot} ${named_flags}"
+ fi
echo 'starting named'; named $named_flags
fi