diff options
Diffstat (limited to 'nfs/scripts/image_capture.sh')
-rw-r--r-- | nfs/scripts/image_capture.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/nfs/scripts/image_capture.sh b/nfs/scripts/image_capture.sh new file mode 100644 index 0000000..53c75ad --- /dev/null +++ b/nfs/scripts/image_capture.sh @@ -0,0 +1,21 @@ +#!/bin/busybox sh +# 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" + +if [ -d "$outdir" ] +then rm -r "$outdir" +fi +mkdir -p "$outdir" +cd "$outdir" +mkdir logs +date >logs/date.log + +# Start the capture using the customized script (image_capture_<hostname>.sh) +source $scriptdir/image_capture_${hostname}.sh + +date >>logs/date.log + |