Update sane-backends options
authorHugo Villeneuve <hugo@hugovil.com>
Tue, 30 Dec 2014 02:17:24 +0000 (21:17 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Tue, 30 Dec 2014 03:52:35 +0000 (22:52 -0500)
stage5/pkg/sane-backends
stage5/post-install

index 3b21f94..c747e2f 100644 (file)
@@ -13,10 +13,14 @@ hvconfig_pre()
     # 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
+    # Group for sane server
+    hv_useradd --system -c saned -d /dev/null -g scanner -s /bin/false saned
 
-    CONFIGURE_OPTS+=" --with-x=${USE_X_OPTION}"
+    CONFIGURE_OPTS+=" \
+        --with-x=${USE_X_OPTION} \
+        --localstatedir=/var \
+        --with-group=scanner \
+        --enable-libusb_1_0"
 }
 
 hvbuild_post()
@@ -24,6 +28,8 @@ hvbuild_post()
     install -v -m 644 tools/udev/libsane.rules \
         /etc/udev/rules.d/65-scanner.rules
 
+    chgrp -v scanner /var/lock/sane
+
     # Addition to /etc/services (for both the client and server)
     string_add "sane      6566/tcp   saned # SANE Network Scanner Daemon" \
         /etc/services
@@ -50,6 +56,7 @@ service sane
    protocol       = tcp
    wait           = no
    user           = saned
+   group          = scanner
    server         = /usr/sbin/saned
    log_type       = SYSLOG local4 info
 }
index 52cca62..c50b649 100755 (executable)
@@ -8,7 +8,8 @@ if [ -n "${REGUSER}" ]; then
     hv_useradd -g users -s /bin/bash -m ${REGUSER}
 
     # Add user to these supplementary groups:
-    usermod -a -G audio,video,cdrom,usb,shutdown,kvm,lpadmin ${REGUSER}
+    usermod -a -G audio,video,cdrom,usb,shutdown,kvm,lpadmin,scanner,plugdev  \
+            ${REGUSER}
 fi
 
 if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then