From: Ivan Rako Date: Mon, 21 Mar 2005 09:03:43 +0000 (+0000) Subject: r11: X-Git-Tag: debian/3.0.0~94 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=9eeb555dbdfe715e78be965267c1fc45b7a97160;p=carnet-tools-cn.git r11: --- diff --git a/functions.sh b/functions.sh index 6e01cfd..b4218d1 100644 --- a/functions.sh +++ b/functions.sh @@ -114,11 +114,11 @@ cp_backup_conffile() { [ "$CP_SCRIPT_DEBUG" ] && set -vx local file_bak - if [ -z $1 ]; then + if [ -z "$1" ]; then echo "Usage: cp_backup_conffile " 1>&2 return 1 fi - if [ ! -f $1 ]; then + if [ ! -f "$1" ]; then echo "cp_backup_conffile: $1: No such file" 1>&2 return 1 fi @@ -126,9 +126,9 @@ cp_backup_conffile() { file_bak="/var/backups/`basename $1`.bak" if [ ! -f $file_bak ]; then - cp -pf $1 $file_bak + cp -pf "$1" $file_bak else - if ! cmp -s $1 $file_bak; then + if ! cmp -s "$1" $file_bak; then /usr/bin/savelog -p -c 7 $file_bak > /dev/null 2> /dev/null cp -pf $1 $file_bak fi