2013-09-13 23:58:59 +02:00
|
|
|
#! @shell@ -e
|
|
|
|
|
|
|
|
chrootenvDest=/run/chrootenv/@name@
|
|
|
|
|
|
|
|
# Create some mount points for stuff that must be bind mounted
|
|
|
|
mkdir -p $chrootenvDest/{nix/store,dev,proc,sys,host-etc,home,var,run}
|
|
|
|
|
|
|
|
# Symlink the software that should be part of the chroot system profile
|
2015-02-05 16:12:14 +01:00
|
|
|
for i in @chrootEnv@/*
|
2013-09-13 23:58:59 +02:00
|
|
|
do
|
2015-03-09 15:13:27 +01:00
|
|
|
if [ "$i" != "@chrootEnv@/var" ]
|
2013-09-13 23:58:59 +02:00
|
|
|
then
|
|
|
|
ln -s "$i" "$chrootenvDest"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Create root folder
|
|
|
|
mkdir $chrootenvDest/root
|
|
|
|
|
|
|
|
# Create tmp folder
|
2014-09-09 10:53:52 +02:00
|
|
|
mkdir -m1777 $chrootenvDest/tmp
|
|
|
|
mkdir -m1777 -p /tmp/chrootenv-@name@
|