X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpkg%2Fsane-backends;h=639fc43871f5049c061e5472427b4bfc6a2d2e68;hb=2e99891bbd3b7af24b871d39d2393130826e6772;hp=b12df7c3b23143d7cf2305dd396587feaad2c4e4;hpb=f3c8db3027d5dc530e1f30c88e0235975211582e;p=hvlinux.git diff --git a/stage5/pkg/sane-backends b/stage5/pkg/sane-backends index b12df7c..639fc43 100644 --- a/stage5/pkg/sane-backends +++ b/stage5/pkg/sane-backends @@ -10,20 +10,21 @@ hvconfig_pre() USE_X_OPTION="no" fi - hv_groupadd saned - hv_useradd -c saned -d /dev/null -g saned -s /bin/false saned + # Add group for UDEV rules + groupadd --system -f scanner + + groupadd --system -f saned + hv_useradd --system -c saned -d /dev/null -g saned -s /bin/false saned # Fixes an obsolete udev parameter: sed -i 's/SYSFS/ATTRS/g' ${LFS_TMP}/${PACKAGE}/tools/sane-desc.c - CONFIGURE_OPTS=" \ - ${CONFIGURE_OPTS} \ - --with-x=${USE_X_OPTION}" + CONFIGURE_OPTS+=" --with-x=${USE_X_OPTION}" } hvbuild_post() { - install -m 644 -v tools/udev/libsane.rules \ + install -v -m 644 tools/udev/libsane.rules \ /etc/udev/rules.d/65-scanner.rules # Addition to /etc/services (for both the client and server) @@ -36,16 +37,26 @@ hvbuild_post() if [ -z "${SANE_SERVER}" ]; then # If 'SANE_SERVER' is not defined, then we automatically configure for # the SANE Network Daemon. - + # Adding entry to '/etc/sane.d/dll.conf' #######echo "${SANE_DRIVER}" >> /etc/sane.d/dll.conf # Creating '/etc/sane.d/saned.conf' echo "${LAN_NETWORK_MASK}" > /etc/sane.d/saned.conf - - # Addition to /etc/inetd.conf - string_add "sane stream tcp nowait saned /usr/sbin/tcpd saned" \ - /etc/inetd.conf + + # Addition to xinetd + cat > /etc/xinetd.d/saned << "EOF" +service sane +{ + disable = no + socket_type = stream + protocol = tcp + wait = no + user = saned + server = /usr/sbin/saned + log_type = SYSLOG local4 info +} +EOF else # If 'SANE_SERVER' is defined, then we must specify the address of the # remote SANE server to use.