The latest beagle-crawl-system from CVS hangs at a bash login prompt. I don't believe the following line is correct: eval nice -n 19 $IONICE su $CRAWL_USER -s /bin/bash -c \" MONO_SHARED_DIR=$MONO_SHARED_DIR @sbindir@/beagle-build-index --target @localstatedir@/cache/beagle/indexes/$CRAWL_INDEX_NAME $OPTIONS $CRAWL_PATHS\" > /dev/null 2>&1 According to the su manpage, the options are supposed to come before the user name, here it is after. All I get is a bash login prompt when I remove the "/dev/null 2>&1". If I change the beagleindex shell to /bin/false, it returns immediately. So the shell option isn't taking effect. I changed to this: eval nice -n 19 $IONICE su -s @sbindir@/beagle-build-index $CRAWL_USER \"--target @localstatedir@/cache/beagle/indexes/$CRAWL_INDEX_NAME $OPTIONS $CRAWL_PATHS\" > /dev/null 2>&1 and it works regardless of the shell I have set in /etc/password for beagleindex. I moved the "-s" option to before the user name and am using @sbindir@/beagle-build-index for the shell directly, instead of calling bash. I also had to export MONO_SHARED_DIR which I think is cleaner. I am posting here instead of a bug to see if there is something I'm missing. As CVS stands, /etc/cron.daily/beagle-crawl-system does not work. This change makes it work and seems correct. Please review and comment on the attached patch. -- Pat Double, pat patdouble com "In the beginning God created the heaven and the earth."
Index: beagle-crawl-system.in =================================================================== RCS file: /cvs/gnome/beagle/tools/beagle-crawl-system.in,v retrieving revision 1.13 diff -u -r1.13 beagle-crawl-system.in --- beagle-crawl-system.in 17 Apr 2006 20:11:32 -0000 1.13 +++ beagle-crawl-system.in 20 Apr 2006 10:55:02 -0000 @@ -35,6 +35,7 @@ # Mono requires a writable wapi directory MONO_SHARED_DIR=`mktemp -d -p $TMPDIR .beagleindexwapi.XXXXXXXXXX`|| ( echo "Can't create wapi directory!" ; exit 1 ) chown $CRAWL_USER $MONO_SHARED_DIR +export MONO_SHARED_DIR for crawl_file in @sysconfdir@/beagle/crawl-*; do unset CRAWL_ENABLED CRAWL_DISABLE_FILTERING CRAWL_RECURSIVE CRAWL_CACHE_TEXT CRAWL_ALLOW_PATTERNS CRAWL_DENY_PATTERNS CRAWL_PATHS CRAWL_INDEX_NAME @@ -64,7 +65,7 @@ IONICE="$IONICE -c 3" fi - eval nice -n 19 $IONICE su $CRAWL_USER -s /bin/bash -c \" MONO_SHARED_DIR=$MONO_SHARED_DIR @sbindir@/beagle-build-index --target @localstatedir@/cache/beagle/indexes/$CRAWL_INDEX_NAME $OPTIONS $CRAWL_PATHS\" > /dev/null 2>&1 + eval nice -n 19 $IONICE su -s @sbindir@/beagle-build-index $CRAWL_USER \"--target @localstatedir@/cache/beagle/indexes/$CRAWL_INDEX_NAME $OPTIONS $CRAWL_PATHS\" > /dev/null 2>&1 fi fi done
Attachment:
pgpYXXAJtE8rr.pgp
Description: PGP signature