X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=carnet-tools-cn.git;a=blobdiff_plain;f=functions.sh;fp=functions.sh;h=8c2e0e864459f73659fa92e9093f4678b69ecfdb;hp=47ad62f0e3be17026aac7ff9fee678468bb1e67a;hb=9d14d6fd31235bc0c8a6733fcf37cec81879dfcd;hpb=53e4a56a246421d5ec52c23135661e9b7d7ddb63 diff --git a/functions.sh b/functions.sh index 47ad62f..8c2e0e8 100644 --- a/functions.sh +++ b/functions.sh @@ -173,6 +173,7 @@ cp_backup_conffile() { -p) shift opt_p=1 + ;; -d) shift opt_d=1 @@ -187,11 +188,13 @@ cp_backup_conffile() { -n) shift ext= + ;; esac done if [ "$opt_d" ]; then if [ ! -e "$dir" -a "$opt_p" ]; then mkdir "$dir" + fi if [ $? -ne 0 ]; then echo "cp_backup_conffile: Error creating backup directory $dir" 1>&2 return 3