From 5d2f462427acf38aafc0e2d3a203ce0197b3eafc Mon Sep 17 00:00:00 2001 From: Ivan Rako Date: Fri, 26 Aug 2005 08:09:35 +0000 Subject: [PATCH] r75: dodane jellyjeve ispravke. --- functions.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/functions.sh b/functions.sh index cd0bdee..8ef8254 100644 --- a/functions.sh +++ b/functions.sh @@ -232,7 +232,7 @@ cp_check_and_sed() { fi ret=0 done - [ "$ret" -eq 2 -a "$grepret" ] && ret=1 || true + [ "$ret" -eq 2 -a "$grepret" ] && ret=1 return $ret } @@ -261,8 +261,12 @@ cp_mail () { quiet=1 shift fi - [ -n "$1" ] && pkg="$1" # barf if no package - [ -n "$2" ] && version=" $2" || true + if [ -n "$1" ]; then + pkg="$1" + else + return 1 # must have at least the package name as argument + fi + [ -n "$2" ] && version=" $2" if [ "$(echo $CP_NOTICE|wc -w)" -gt 0 ]; then [ -n "$quiet" ] || echo "Mailing upgrade output to root." CP_NOTICE="From: $pkg postinst script -- 1.7.10.4