summaryrefslogtreecommitdiff
path: root/sbin/init/Makefile
diff options
context:
space:
mode:
authorsalo <salo@NetBSD.org>2006-04-18 11:40:26 +0000
committersalo <salo@NetBSD.org>2006-04-18 11:40:26 +0000
commitb0b7590bc76ed45b91c049c74c3d71f7c00c7481 (patch)
treeaa5e2ac1346c40bfbe53b5c1cd09de7746965a81 /sbin/init/Makefile
parentc8d26799805a10cf1611d1e7a7d6b64084831c83 (diff)
Add support for running multi-user in a chroot() environment.
How it works: - after successful execution of /etc/rc, check the value of "init.root" sysctl node, if it's different than "/", chroot() into its value and run /etc/rc inside the chroot(), - in single-user, return back to the original / file system. Allows running with / file system on e.g., cgd(4), vnd(4) or ccd(4) volumes. Idea first discussed with Matt Thomas, implemented by Jachym Holecek <freza (at) liberouter.org> with some nitpicks by me. Successfully used by me for almost a year with / on a cgd(4) volume (for more information about the setup check ftp://ftp.NetBSD.org/pub/NetBSD/misc/salo/init-chroot/ ).
Diffstat (limited to 'sbin/init/Makefile')
-rw-r--r--sbin/init/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/init/Makefile b/sbin/init/Makefile
index ebffa5b9b2c..edd55a209a0 100644
--- a/sbin/init/Makefile
+++ b/sbin/init/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2005/01/13 03:21:59 lukem Exp $
+# $NetBSD: Makefile,v 1.36 2006/04/18 11:40:26 salo Exp $
# @(#)Makefile 8.1 (Berkeley) 7/19/93
PROG= init
@@ -10,7 +10,7 @@ CPPFLAGS+= -DMFS_DEV_IF_NO_CONSOLE -DSUPPORT_UTMP -DSUPPORT_UTMPX
.ifdef SMALLPROG
CPPFLAGS+= -DLETS_GET_SMALL
.else
-CPPFLAGS+= -DALTSHELL -DSECURE
+CPPFLAGS+= -DALTSHELL -DSECURE -DCHROOT
DPADD+= ${LIBCRYPT}
LDADD+= -lcrypt
.endif