From: Ivan Rako Date: Tue, 22 Mar 2005 10:06:05 +0000 (+0000) Subject: r18: X-Git-Tag: debian/3.0.0~87 X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=commitdiff_plain;h=491a93c69b438d7fcbf3980185558dee614781ea;p=carnet-tools-cn.git r18: --- diff --git a/changelog.CARNet b/changelog.CARNet index f12dc85..7c29811 100644 --- a/changelog.CARNet +++ b/changelog.CARNet @@ -4,11 +4,13 @@ carnet-tools-cn (2.0) testing; urgency=low * dodane funkcije: - cp_get_ifaddr - cp_get_ifmask - - cp_get_cidr + - cp_get_ifdefault + - cp_get_netaddr - cp_backup_conffile - cp_check_and_sed + - cp_safe_file_replace - -- Ivan 'ico' Rako Wed, 16 Mar 2005 14:27:46 +0100 + -- Ivan 'ico' Rako Tue, 22 Mar 2005 10:53:43 +0100 carnet-tools (1.2) unstable; urgency=low diff --git a/debian/control b/debian/control index 585a8ed..4b8f96b 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.6.1 Package: carnet-tools-cn Architecture: all -Depends: perl, coreutils, debianutils, awk, ipcalc, net-tools +Depends: perl, coreutils, debianutils, awk | mawk | gawk, ipcalc, net-tools Description: CARNet tools for Debian packaging CARNet tools for Debian packaging. Include: - functions.sh diff --git a/functions.sh b/functions.sh index e625d51..5bb7ae6 100644 --- a/functions.sh +++ b/functions.sh @@ -223,8 +223,12 @@ ${CP_NOTICE}----------" cp_safe_file_replace () { [ "$CP_SCRIPT_DEBUG" ] && set -vx local new old - new=$1 - old=$2 + if [ -z "$2" ]; then + echo "Usage: cp_safe_file_replace " 1>&2 + return 1 + fi + new="$1" + old="$2" if [ -e "$old" ]; then chown --reference "$old" "$new" chmod --reference "$old" "$new"