diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2020-07-04 23:38:38 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2020-07-04 23:38:38 +0200 |
commit | cf81fed0c9277550e6b98927f7ff2f8eb5de7b40 (patch) | |
tree | d193ebdaed1853d2868c26c43d2fc0c00ebb42ac /nfs/scripts/image_capture.sh | |
parent | 8d273fe8d76ef394cfab04a195c90f4b7aeb8495 (diff) | |
download | eficast-cf81fed0c9277550e6b98927f7ff2f8eb5de7b40.tar.gz eficast-cf81fed0c9277550e6b98927f7ff2f8eb5de7b40.tar.bz2 eficast-cf81fed0c9277550e6b98927f7ff2f8eb5de7b40.zip |
Add blkdiscard on image. Add nfs scripts newer examples.
Diffstat (limited to 'nfs/scripts/image_capture.sh')
-rw-r--r-- | nfs/scripts/image_capture.sh | 9 |
1 files changed, 6 insertions, 3 deletions
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 |