diff options
author | intrigeri <intrigeri@boum.org> | 2011-08-04 19:46:35 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2011-08-04 19:46:35 +0200 |
commit | d8ac62a9ec105c80163a025ad06a2d91bca8b753 (patch) | |
tree | 1fa779a68fd9245d5e1ef011c0349bbf1787551f /scripts/build/lb_chroot_hacks | |
parent | 1deaeb04e59c4afd76d69b53d4e9ffc2a9a7b930 (diff) | |
download | vyos-live-build-d8ac62a9ec105c80163a025ad06a2d91bca8b753.tar.gz vyos-live-build-d8ac62a9ec105c80163a025ad06a2d91bca8b753.zip |
Cleaning up temporary directories at the same time as other cruft.
Diffstat (limited to 'scripts/build/lb_chroot_hacks')
-rwxr-xr-x | scripts/build/lb_chroot_hacks | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/build/lb_chroot_hacks b/scripts/build/lb_chroot_hacks index eed0294d8..57f5769fa 100755 --- a/scripts/build/lb_chroot_hacks +++ b/scripts/build/lb_chroot_hacks @@ -226,6 +226,14 @@ rm -f chroot/var/cache/debconf/*-old rm -f chroot/var/lib/dpkg/*-old rm -f chroot/var/log/apt/term.log +# Delete and re-create temporary directories +TEMP_DIRS="/tmp /var/tmp" +for DIR in ${TEMP_DIRS} +do + rm -rf "chroot/${DIR}" + install -d -m 1777 "chroot/${DIR}" +done + if [ -n "${LB_ROOT_COMMAND}" ] then ${LB_ROOT_COMMAND} chown -R --quiet $(whoami):$(whoami) chroot |