diff options
author | Daniel Baumann <daniel@debian.org> | 2012-12-16 23:56:34 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-12-16 23:56:55 +0100 |
commit | 43434c2f6a84ec5ad294c23506d6aff4ebd96c70 (patch) | |
tree | 53f834c60fa78946a8a6483c685d720ede46f01d /share/hooks/0150-remove-temporary-files.chroot | |
parent | 8618786d5f303fe8e35cecc3be46f144d2aa2e53 (diff) | |
download | vyos-live-build-43434c2f6a84ec5ad294c23506d6aff4ebd96c70.tar.gz vyos-live-build-43434c2f6a84ec5ad294c23506d6aff4ebd96c70.zip |
Moving removal of backup and temporary files to their own hook script.
Diffstat (limited to 'share/hooks/0150-remove-temporary-files.chroot')
-rwxr-xr-x | share/hooks/0150-remove-temporary-files.chroot | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/share/hooks/0150-remove-temporary-files.chroot b/share/hooks/0150-remove-temporary-files.chroot new file mode 100755 index 000000000..21bc5ee6f --- /dev/null +++ b/share/hooks/0150-remove-temporary-files.chroot @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +# Remove temporary files +for _DIRECTORY in /tmp /var/tmp +do + rm -rf ${_DIRECTORY} + + mkdir -p ${_DIRECTORY} + chmod 1777 ${_DIRECTORY} +done |