Your message dated Thu, 14 Feb 2008 10:11:21 +0100
with message-id <[EMAIL PROTECTED]>
and subject line Re: scanbuttond: better example in buttonpressed.sh
has caused the Debian Bug report #370428,
regarding scanbuttond: better example in buttonpressed.sh
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
370428: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=370428
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: scanbuttond
Version: 0.2.3-2
Severity: wishlist

The appended buttonpressed.sh is better than the provided example in
many respects.  First of all, it works with the etch version of
scanimage.


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages scanbuttond depends on:
ii  libc6                         2.3.6-7    GNU C Library: Shared libraries
ii  libsane                       1.0.17-3   API library for scanners

Versions of packages scanbuttond recommends:
ii  sane-utils                    1.0.17-3   API library for scanners -- utilit

-- no debconf information

===File /etc/scanbuttond/buttonpressed.sh===================
#!/bin/sh

# This script is started by scanbuttond whenever a scanner button has been 
pressed.
# Scanbuttond passes the following parameters to us:
# $1 ... the button number
# $2 ... the scanner's SANE device name, which comes in handy if there are two 
or 
#        more scanners. In this case we can pass the device name to SANE 
programs 
#        like scanimage.

exec >> /var/log/scanbuttond.log
exec 2>&1

echo
echo -- $0 started on `date`

LOCKFILE="/tmp/$2.lock"
PRINTER="-P bn"

case $1 in
        1)
                echo "button 1 has been pressed on $2"
                ;;
        2)
                echo "button 2 has been pressed on $2"
                
                # Turn your scanner+printer into an A4 photocopier.
                # Requires sane-utils, lockfile-progs and netpbm.
                if ! lockfile-create --retry 2 $LOCKFILE; then
                  echo "Error: scanning already in progress for $2"
                  exit
                fi
                #set -x
                RES="--resolution 300 --contrast 10 --brightness 0"
                scanimage --verbose --device-name $2 \
                    --mode Gray -x 210 -y 297 $RES |
                  pnmtops -width=8.27 -height=11.69 |
                  lpr -J $2 $PRINTER
                lockfile-remove $LOCKFILE
                ;;
        3)
                echo "button 3 has been pressed on $2"
                ;;
        4)
                echo "button 4 has been pressed on $2"
                ;;
esac

============================================================


--- End Message ---
--- Begin Message ---
This bug has apparently not been closed properly by the scanbuttond
0.2.3-3 upload, so I'm closing it now.


--- End Message ---

Reply via email to