commit: b1de3d690cae89df37029bd30f0d1621ed32d0e3
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 8 18:49:20 2015 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Jul 8 18:49:20 2015 +0000
URL: https://gitweb.gentoo.org/proj/grs.git/commit/?id=b1de3d69
scripts/clean.sh: migrate cleaning to chroot script.
build | 6 +++---
scripts/clean.sh | 5 +++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/build b/build
index b7f039f..d7ed587 100644
--- a/build
+++ b/build
@@ -7,8 +7,8 @@ populate 1
runscript cycle.1.sh
runscript cycle.1.py
pivot tmp/stage1root
+runscript clean.sh
unmount
-clean
tarit stage1-amd64-hardened
hashit
@@ -19,8 +19,8 @@ log stamp
mount
populate 2
runscript cycle.2.sh
+runscript clean.sh
unmount
-clean
tarit stage2-amd64-hardened
hashit
@@ -31,7 +31,7 @@ log stamp
mount
populate 3
runscript cycle.3.sh
+runscript clean.sh
unmount
-clean
tarit stage3-amd64-hardened
hashit
diff --git a/scripts/clean.sh b/scripts/clean.sh
new file mode 100644
index 0000000..b1ad9e0
--- /dev/null
+++ b/scripts/clean.sh
@@ -0,0 +1,5 @@
+#!/bin/bash -e
+
+for d in /tmp /var/tmp /var/log; do
+ find ${d} -mindepth 1 -exec rm -rf {} +
+rm -rf /etc/resolv.conf