sane configuration
authorarne_f <arne_f@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 4 Mar 2008 06:37:05 +0000 (06:37 +0000)
committerarne_f <arne_f@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 4 Mar 2008 06:37:05 +0000 (06:37 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1247 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

config/rootfiles/cdrom_corever
config/rootfiles/packages/sane
config/sane/saned.conf [new file with mode: 0644]
lfs/sane
src/initscripts/init.d/sane [new file with mode: 0644]
src/scripts/sanedloop [new file with mode: 0644]

index 87eb5fa..75613aa 100644 (file)
@@ -566,3 +566,8 @@ usr/etc/sane.d/mustek_pp.conf
 usr/lib/sane/libsane-mustek_pp.so
 usr/lib/sane/libsane-mustek_pp.so.1
 usr/lib/sane/libsane-mustek_pp.so.1.0.19
+etc/rc.d/init.d/sane
+etc/rc.d/rc3.d/S95sane
+etc/rc.d/rc0.d/K10sane
+etc/rc.d/rc6.d/K10sane
+usr/local/bin/sanedloop
diff --git a/config/sane/saned.conf b/config/sane/saned.conf
new file mode 100644 (file)
index 0000000..7e25244
--- /dev/null
@@ -0,0 +1,24 @@
+#
+# saned.conf
+#
+# The contents of the saned.conf  file  is  a  list  of  host  names,  IP
+# addresses or IP subnets (CIDR notation) that are permitted to use local
+# SANE devices. IPv6 addresses must be enclosed in brackets,  and  should
+# always  be specified in their compressed form.
+#
+# The hostname matching is not case-sensitive.
+#
+#scan-client.somedomain.firm
+#192.168.0.1
+#192.168.0.1/29
+#[2001:7a8:185e::42:12]
+#[2001:7a8:185e::42:12]/64
+#
+# NOTE: /etc/inetd.conf (or /etc/xinetd.conf) and
+# /etc/services must also be properly configured to start
+# the saned daemon as documented in saned(8), services(4)
+# and inetd.conf(4) (or xinetd.conf(5)).
+#
+# a singe "+" allow all hosts to connect.
++
+
index caa2824..da35cfa 100644 (file)
--- a/lfs/sane
+++ b/lfs/sane
@@ -34,7 +34,7 @@ TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = sane
 PAK_VER    = 1
 
-DEPS       = ""
+DEPS       = "libtiff"
 
 ###############################################################################
 # Top-level Rules
@@ -81,5 +81,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
                                     --enable-parport-directio
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
+       cp -vf $(DIR_SRC)/config/sane/saned.conf /usr/etc/sane.d/
+       ln -sf ../init.d/sane /etc/rc.d/rc3.d/S95sane
+       ln -sf ../init.d/sane /etc/rc.d/rc0.d/K10sane
+       ln -sf ../init.d/sane /etc/rc.d/rc6.d/K10sane
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/src/initscripts/init.d/sane b/src/initscripts/init.d/sane
new file mode 100644 (file)
index 0000000..3ada557
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/sane
+#
+# Description : Sane Network deamon
+#
+# Authors     : Arne Fitzenreiter (arne_f@ipfire.org)
+#
+# Version     : 01.00
+#
+# Notes       : runs sanedloop ibecause saned is intended
+#              for use with (x)inet.d
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+       start)
+               boot_mesg "Starting sane - network scanner deamon..."
+               killall sanedloop > /dev/nul 2&>1
+               killall saned > /dev/nul 2&>1
+               /usr/local/bin/sanedloop &
+               evaluate_retval
+               ;;
+
+       stop)
+               boot_mesg "Stopping sane - network scanner deamon..."
+               killall sanedloop > /dev/nul 2&>1
+               killall saned > /dev/nul 2&>1
+               echo_ok
+               ;;
+
+       restart)
+               ${0} start
+               ;;
+
+       status)
+               statusproc /usr/bin/sanedloop
+               statusproc /usr/sbin/saned
+               ;;
+
+       *)
+               echo "Usage: ${0} {start|stop|restart|status}"
+               exit 1
+               ;;
+esac
+
+# End $rc_base/init.d/sane
diff --git a/src/scripts/sanedloop b/src/scripts/sanedloop
new file mode 100644 (file)
index 0000000..f29425a
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# saned is intended for use with (x)inet.d so we have to recall it in a loop
+#
+while true; 
+do
+    /usr/sbin/saned -s0;
+done;