fi
ret=0
done
- [ "$ret" -eq 2 -a "$grepret" ] && ret=1 || true
+ [ "$ret" -eq 2 -a "$grepret" ] && ret=1
return $ret
}
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 <root>