From cf81fed0c9277550e6b98927f7ff2f8eb5de7b40 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sat, 4 Jul 2020 23:38:38 +0200 Subject: Add blkdiscard on image. Add nfs scripts newer examples. --- nfs/scripts/image_capture.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'nfs/scripts/image_capture.sh') diff --git a/nfs/scripts/image_capture.sh b/nfs/scripts/image_capture.sh index 7c23c30..ae72320 100644 --- a/nfs/scripts/image_capture.sh +++ b/nfs/scripts/image_capture.sh @@ -2,9 +2,9 @@ # Should only started from autorun.sh, it defines some helper functions and variables) # Prepare capture -year=$(date +%Y) -monthday=$(date +%m-%d) -outdir="$imagedir/$year/$hostname/$monthday" +last=$(date +%Y%m%d) +lastfile="$imagedir/$hostname/last" +outdir="$imagedir/$hostname/$last" if [ -d "$outdir" ] then rm -r "$outdir" @@ -20,7 +20,10 @@ env setterm -bold off echo_color green black "$scriptdir/image_capture_${hostname}.sh script will run on tty1 now" pause10s + +# Do the work then mark image in "last" after completion source $scriptdir/image_capture_${hostname}.sh +echo $last > $lastfile date >>logs/date.log -- cgit v1.2.3