[ "$CP_SCRIPT_DEBUG" ] && set -vx
local file_bak
- if [ -z $1 ]; then
+ if [ -z "$1" ]; then
echo "Usage: cp_backup_conffile <file>" 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
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