This commit is contained in:
Igor Pečovnik 2015-12-18 19:41:37 +01:00
commit 155a2a666c

View file

@ -80,7 +80,7 @@ if [ -f "$DEST/cache/rootfs/$RELEASE.tgz" ]; then
currtime=`date +%s`
diff=$(( (currtime - filemtime) / 86400 ))
display_alert "Extracting $RELEASE from cache" "$diff days old" "info"
pigz -dc "$DEST/cache/rootfs/$RELEASE.tgz" | tar xpf - -C $DEST/cache/sdcard/
pv -p -b -r "$DEST/cache/rootfs/$RELEASE.tgz" | pigz -dc | tar xp -C $DEST/cache/sdcard/
if [ "$diff" -gt "3" ]; then
chroot $DEST/cache/sdcard /bin/bash -c "apt-get update" | dialog --backtitle "$backtitle" --title "Force package update ..." --progressbox 20 70
fi
@ -182,8 +182,8 @@ KILLPROC=$(ps -uax | pgrep ntpd | tail -1); if [ -n "$KILLPROC" ]; then k
KILLPROC=$(ps -uax | pgrep dbus-daemon | tail -1); if [ -n "$KILLPROC" ]; then kill -9 $KILLPROC; fi
display_alert "Closing debootstrap process and preparing cache." "" "info"
tar cpf - --directory=$DEST/cache/sdcard/ --exclude='dev/*' --exclude='proc/*' --exclude='run/*' --exclude='tmp/*' \
--exclude='mnt/*' --exclude='sys/*' . | pigz > $DEST/cache/rootfs/$RELEASE.tgz
tar cp --directory=$DEST/cache/sdcard/ --exclude='dev/*' --exclude='proc/*' --exclude='run/*' --exclude='tmp/*' \
--exclude='mnt/*' --exclude='sys/*' . | pv -p -b -r -s $(du -sb $DEST/cache/sdcard/ | cut -f1) | pigz > $DEST/cache/rootfs/$RELEASE.tgz
fi
#
# mount proc, sys and dev