From 3fd01b171a74d28dc8e48b9ee5f2d0e9a3915fb8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 27 Feb 2014 23:17:53 +0100 Subject: Set up a minimal /dev in chroots Not bind-mounting the /dev from the host also solves the problem with /dev/shm being a symlink to something not in the chroot. --- src/libutil/util.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libutil/util.cc') diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 740d767a4..b264fc5f3 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -386,6 +386,13 @@ Paths createDirs(const Path & path) } +void createSymlink(const Path & target, const Path & link) +{ + if (symlink(target.c_str(), link.c_str())) + throw SysError(format("creating symlink from `%1%' to `%2%'") % link % target); +} + + LogType logType = ltPretty; Verbosity verbosity = lvlInfo; -- cgit v1.2.3