From 00fc8700fafc4abf2de08b6d5d73a00d2217f796 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Thu, 16 Jul 2026 17:10:20 +0200 Subject: [PATCH] change postinst optimize error return --- src/debian/postinst | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) 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" -- 2.47.3