42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
$NetBSD: patch-ae,v 1.4 2014/05/14 04:35:20 rodent Exp $
|
|
|
|
Fix portability failure.
|
|
|
|
--- doc/samples/cdbackup.sh.orig 2013-08-25 17:09:49.000000000 +0000
|
|
+++ doc/samples/cdbackup.sh
|
|
@@ -72,8 +72,8 @@ RM="/bin/rm"
|
|
#initial call of this script (just executes dar with the proper parameters):
|
|
DATE=`$DATECMD -I`
|
|
START=`$DATECMD`
|
|
-if [ "$1" != "" ] && [ "$2" == "" ] ; then
|
|
- if [ "$1" == "full" ] ; then
|
|
+if [ $# -eq 1 ] ; then
|
|
+ if [ "$1" = "full" ] ; then
|
|
echo "starting full backup"
|
|
$DAR_EXEC -c "$TDIR/$DATE" \
|
|
-X "$DATE.*.dar" -X "darswap" \
|
|
@@ -95,7 +95,7 @@ elif [ -r "$1/$2.$3.dar" ] ; then
|
|
echo -n "creating cdr $3 volume dir containing $2.$3.dar"
|
|
$MKDIR "$1/$2.$3.cdr"
|
|
$MV "$1/$2.$3.dar" "$1/$2.$3.cdr"
|
|
- if [ "$3" == "1" ] ; then
|
|
+ if [ "$3" = "1" ] ; then
|
|
echo -n " and dar_static"
|
|
$CP $DAR_STATIC "$1/$2.$3.cdr"
|
|
fi
|
|
@@ -109,12 +109,12 @@ elif [ -r "$1/$2.$3.dar" ] ; then
|
|
$CDRECORD -eject -s dev=$DEV speed=$DRIVESPEED tsize=${CDBLOCKS}s -
|
|
do
|
|
read -p "write error, try [A]gain or [k]eep $2.$3.dar? " ERR
|
|
- if [ "$ERR" == "k" ] ; then
|
|
+ if [ "$ERR" = "k" ] ; then
|
|
KEEPFILE="y"
|
|
break
|
|
fi
|
|
done
|
|
- if [ "$KEEPFILE" == "y" ] ; then
|
|
+ if [ "$KEEPFILE" = "y" ] ; then
|
|
echo "cdr not written, keeping $2.$3.dar as file"
|
|
$MV "$1/$2.$3.cdr/$2.$3.dar" "$1/$2.$3.dar"
|
|
fi
|