summaryrefslogtreecommitdiff
path: root/debian/tests/start-net
blob: 65679c3c101c227edff39607a9da7351602fa5b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
set -ex

# Simple test for sane-backends.
# Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
# dep8 restrictions: breaks-bestbed needs-root allow-stderr


# Enable localhost
sed -i '/localhost/d' /etc/sane.d/saned.conf
echo localhost >>/etc/sane.d/saned.conf

# Enable pnm
sed -i 's/^#\(pnm\)$/\1/' /etc/sane.d/dll.conf

# Enable saned.socket
systemctl enable saned.socket

#
# test
#
CNT=`scanimage -d net -L | grep net: | wc -l`

if [ ${CNT} -eq 2 ] ; then
    exit 0
else
    exit 100
fi