* 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 <irako@srce.hr> Wed, 16 Mar 2005 14:27:46 +0100
+ -- Ivan 'ico' Rako <irako@srce.hr> Tue, 22 Mar 2005 10:53:43 +0100
carnet-tools (1.2) unstable; urgency=low
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
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 <new-file> <target-file>" 1>&2
+ return 1
+ fi
+ new="$1"
+ old="$2"
if [ -e "$old" ]; then
chown --reference "$old" "$new"
chmod --reference "$old" "$new"