Package: apt-xapian-index
Version: 0.30
Severity: normal
Tags: patch

1. ionice should not be called in an virtual environment
(fix similar to man-db cronjobs)

2. [-x $IONICE ] returns 0 if $IONICE is not set.
fix this by enclosing $IONICE (and $CMD) in ""

proposed patch attached.

thanks,
raoul
diff -r 7f44a0363a3e cron.weekly/apt-xapian-index
--- a/cron.weekly/apt-xapian-index	Mon May 17 09:27:12 2010 +0200
+++ b/cron.weekly/apt-xapian-index	Mon May 17 11:24:48 2010 +0200
@@ -1,12 +1,12 @@
 #!/bin/sh
 
 CMD=/usr/sbin/update-apt-xapian-index
-IONICE=/usr/bin/ionice
+egrep -q '(envID|VxID):.*[1-9]' /proc/self/status || IONICE=/usr/bin/ionice
 
 # Rebuild the index
-if [ -x $CMD ]
+if [ -x "$CMD" ]
 then
-	if [ -x $IONICE ]
+	if [ -x "$IONICE" ]
 	then
 		nice $IONICE -c3 $CMD --quiet
 	else

Reply via email to