#!/bin/sh set -ex # Simple test for sane-backends. # Author: Jörg Frings-Fürst # dep8 restrictions: breaks-bestbed needs-root allow-stderr # Enable localhost /bin/sed -i '/localhost/d' /etc/sane.d/saned.conf echo localhost >>/etc/sane.d/saned.conf # Enable pnm /bin/sed -i 's/^#\(pnm\)$/\1/' /etc/sane.d/dll.conf # Enable net @ localhost /bin/sed -i 's/^# \(localhost\)$/\1/' /etc/sane.d/net.conf # Enable & start saned.socket #/bin/systemctl enable saned.socket #/bin/systemctl start saned.socket # # test # CNT=`/usr/bin/scanimage -d net -L | /bin/grep net: | /usr/bin/wc -l` if [ ${CNT} -eq 2 ] ; then exit 0 else exit 100 fi