summaryrefslogtreecommitdiff
path: root/debian/tests/start-net
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests/start-net')
-rw-r--r--debian/tests/start-net33
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/tests/start-net b/debian/tests/start-net
new file mode 100644
index 0000000..dbc2c28
--- /dev/null
+++ b/debian/tests/start-net
@@ -0,0 +1,33 @@
+#!/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 net @ localhost
+sed -i 's/^# \(localhost\)$/\1/' /etc/sane.d/net.conf
+
+# Enable & start saned.socket
+systemctl enable saned.socket
+systemctl start saned.socket
+
+#
+# test
+#
+CNT=`scanimage -d net -L | grep net: | wc -l`
+
+if [ ${CNT} -eq 2 ] ; then
+ exit 0
+else
+ exit 100
+fi
+