X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=functions.sh;h=85e9dd93848db98caf437e78206ceda6419a8625;hb=971e83d17061d018822181d7ce7353f818b8fe7f;hp=cc892b7d5b6bb391fd29dc07f5e476361ae11120;hpb=b8722272394af7853b62e502d3c909e289872277;p=carnet-tools-cn.git diff --git a/functions.sh b/functions.sh index cc892b7..85e9dd9 100644 --- a/functions.sh +++ b/functions.sh @@ -182,6 +182,7 @@ cp_backup_conffile() { } # by jelly, Tue, 15 Mar 2005 14:04:21 +0100 +# modified by ico, Mon, 6 Jun 2005 11:58:08 +0200 # A sed wrapper, to use instead of perl -pi -e # - relatively safe in-place s///g # - takes care of symlinks and ownership @@ -204,6 +205,11 @@ cp_check_and_sed() { fi [ -h "$i" ] && i=$(readlink -f "$i") sed "$sedcmd" "$i" > "$i.dpkg-tmp" + if [ ! "$?" = "0" ]; then + rm "$i.dpkg-tmp" + echo "cp_check_and_sed: Problem with sed" 1>&2 + return 5 + fi if ! cmp -s "$i" "$i.dpkg-tmp" 2>&1 >/dev/null; then cp_mv "$i.dpkg-tmp" "$i" else @@ -276,6 +282,7 @@ cp_mv () { fi mv "$new" "$old" } + # by ddzeko, Mon, 21 Mar 2005 13:35:42 +0100 cp_yes_no () { [ "$CP_SCRIPT_DEBUG" ] && set -vx