Package: pct-scanner-scripts
Version: 0.0.4-3
Severity: wishlist
Tags: patch

Please let me override configuration with
~/.pct-scanner-script.conf.

PS: it seems weird that /etc/pct-scan-script.conf.d/* have lower
    priority than /etc/pct-scan-script.conf.

--- /tmp/pct-scanner-script     2011-07-08 17:16:09.601254345 +0200
+++ /usr/bin/pct-scanner-script 2011-07-08 17:26:11.060479188 +0200
@@ -34,6 +34,7 @@
 
 SYSCONF=/etc/pct-scanner-script.conf
 SYSDIR=/etc/pct-scanner-script.conf.d/
+USERCONF=${HOME}/.pct-scanner-script.conf
 PROCESS=/usr/lib/pct-scanner-scripts/pct-scanner-script-process
 
 unset LINEART
@@ -228,7 +229,9 @@
     tempfile=$(mktemp -p "/tmp/" tempfile.XXXXXXXXXX)
     trap "rm -f $tempfile" 0 1 2 3 15
     [ -z "$tempfile" ] && exit 1
-    files="$SYSCONF"
+    files=''
+    [ -r "$USERCONF" ] && files+="$USERCONF" && files+=$'\n'
+    files+="$SYSCONF"
     files+=$'\n'
     files+=$(run-parts --list "$SYSDIR" )
     if [ -n "$files" ]; then

-- 
 .''`.   martin f. krafft <[email protected]>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)

Reply via email to