]> arthur.barton.de Git - backup-script.git/commitdiff
backup-script-wrapper: Correctly quote "$TMP" variable
authorAlexander Barton <alex@barton.de>
Thu, 24 Jul 2014 09:14:28 +0000 (11:14 +0200)
committerAlexander Barton <alex@barton.de>
Thu, 24 Jul 2014 09:14:28 +0000 (11:14 +0200)
bin/backup-script-wrapper

index 282a9c9b16ad43b8f95eedb0b652eeb7e42fd536..1b2d4495858fda370ffba41a99c3aac0df3e1aef 100755 (executable)
@@ -19,16 +19,16 @@ TMP=`mktemp /tmp/$NAME.XXXXXXXX` || exit 11
 PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
 export PATH
 
-echo "$NAME Report" >$TMP
-echo >>$TMP
-echo " - Host: `hostname -f`" >>$TMP
-echo " - User: `id -un`" >>$TMP
-echo >>$TMP
+echo "$NAME Report" >"$TMP"
+echo >>"$TMP"
+echo " - Host: `hostname -f`" >>"$TMP"
+echo " - User: `id -un`" >>"$TMP"
+echo >>"$TMP"
 
-`dirname "$0"`/backup-script $* >>$TMP 2>&1
+`dirname "$0"`/backup-script $* >>"$TMP" 2>&1
 
-cat $TMP | mail -s "$HOST: $NAME results" "$MAILTO"
+cat "$TMP" | mail -s "$HOST: $NAME results" "$MAILTO"
 
-rm -f $TMP
+rm -f "$TMP"
 
 # -eof-