diff options
Diffstat (limited to 'pkgs/build-support/build-fhs-chrootenv/destroy.sh.in')
-rw-r--r-- | pkgs/build-support/build-fhs-chrootenv/destroy.sh.in | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/build-support/build-fhs-chrootenv/destroy.sh.in b/pkgs/build-support/build-fhs-chrootenv/destroy.sh.in index 30b51cb5068..015f742d85a 100644 --- a/pkgs/build-support/build-fhs-chrootenv/destroy.sh.in +++ b/pkgs/build-support/build-fhs-chrootenv/destroy.sh.in @@ -3,19 +3,20 @@ chrootenvDest=/run/chrootenv/@name@ # Remove bind mount points -rmdir $chrootenvDest/{dev,nix/store,nix,proc,sys,host-etc,home,var,run} +rmdir $chrootenvDest/{dev,nix/store,nix,proc,sys,host-etc,home,var,run,tmp} # Remove symlinks to the software that should be part of the chroot system profile -for i in @chrootEnv@/sw/* +for i in @chrootEnv@/* do - if [ "$i" != "@chrootEnv@/sw/etc" ] && [ "$i" != "@chrootEnv@/sw/var" ] + if [ "$i" != "@chrootEnv@/etc" ] && [ "$i" != "@chrootEnv@/var" ] then rm $chrootenvDest/$(basename $i) fi done # Remove the remaining folders -rm -Rf $chrootenvDest/{etc,root,tmp} +rm -Rf $chrootenvDest/{etc,root} +rm -Rf /tmp/chrootenv-@name@ # Remove the chroot environment folder rmdir $chrootenvDest |