summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-04-14 22:24:52 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-04-14 22:26:22 +0000
commit04a8434a6186b5f52f23d5e6ebeff2aea83e94bf (patch)
tree674010274f50459dadd0356235cdac4ac63e8e68
parent0ca6674b9e3a31219a00ed46acd4d9421ae1c723 (diff)
downloadlive-04a8434a6186b5f52f23d5e6ebeff2aea83e94bf.tar.gz
Use ZFS snapshots instead of deboostrap each time
-rwxr-xr-xprotostar8
1 files changed, 7 insertions, 1 deletions
diff --git a/protostar b/protostar
index dd56440..5153665 100755
--- a/protostar
+++ b/protostar
@@ -15,6 +15,7 @@ USR_IMG=usr.img.$(echo $DATE | md5sum | cut -f1 -d ' ')
ISONAME="${ISONAME:-dyson-${DIST}-${DATE}}.iso"
ROOT="${TMP}/ROOT"
+ROOT=/dyson/deb
BOOTARCH="${ROOT}/boot_archive"
# Move files from usr to usr1,
@@ -40,6 +41,9 @@ if [ -z "${ROOT}" ] || [ "${ROOT}" = / ]; then
fi
rm -rf "${ROOT}"/*
+if zfs list dyson/deb@init; then
+ zfs rollback dyson/deb@init
+else
echo "Preparing base system (debootstrap)..."
debootstrap \
@@ -49,9 +53,11 @@ debootstrap \
"${DIST}" \
"${ROOT}" \
"${REPO}"
+zfs snapshot dyson/deb@init
+fi
mkdir "$ROOT/usr/install"
-cp -a install lib $ROOT/usr/install/
+cp -a install DysonInstaller $ROOT/usr/install/
mv $ROOT/var/lib/dpkg $ROOT/usr/dpkg
ln -sf /usr/dpkg $ROOT/var/lib/dpkg