]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change postinst optimize error return
authorBastian Dehn <hhaalo@arcor.de>
Thu, 16 Jul 2026 15:10:20 +0000 (17:10 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 16 Jul 2026 15:10:20 +0000 (17:10 +0200)
src/debian/postinst

index 546a97eee63cbd71f7eb90d910f03b72f6242144..3ac070b4e01087849b2d79b7392c76e802d670ff 100755 (executable)
@@ -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"