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