From: Bastian Dehn Date: Thu, 16 Jul 2026 15:10:20 +0000 (+0200) Subject: change postinst optimize error return X-Git-Tag: v1.1.35^2~3^2~10 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=00fc8700fafc4abf2de08b6d5d73a00d2217f796;p=sane-kds-s2000w-net.git change postinst optimize error return --- diff --git a/src/debian/postinst b/src/debian/postinst index 546a97e..3ac070b 100755 --- a/src/debian/postinst +++ b/src/debian/postinst @@ -1,26 +1,15 @@ #!/bin/bash - set -e -errlog() -{ - local lastexit=$? - local msg="$1" - - echo "ERROR: $msg" - - return $lastexit -} - main() { DLLCONFIG=${DLLCONFIG:="/etc/sane.d/dll.conf"} local entry_count= local ENTRY="kds_s2000w_net" - [ -f "$DLLCONFIG" ] \ - || errlog "$DLLCONFIG does not exist" \ - || return 0 + [ ! -f "$DLLCONFIG" ] \ + && echo "ERROR: $DLLCONFIG does not exist" \ + && return 0 echo "found $DLLCONFIG" grep --silent "$ENTRY" "$DLLCONFIG" || echo "$ENTRY" >> "$DLLCONFIG"