Since the first "out of process indexing" commit, the beagled script hasn't been doing what its supposed to, if I understand its purpose correctly. If the user launches it with no args, beagled is launched with the --fg arg if running in uninstalled mode, and --bg otherwise. If the user launches it with "beagled --fg" or "beagled --bg" then the launcher script drops the fg/bg args completely and does not apply the default ones either. (So the beagle daemon gets started with no --fg or --bg arg specified). Am I right in thinking that this behaviour is wrong? I would have thought it should give --fg or --bg depending on uninstalled/installed mode, unless the user specifies --fg or --bg as an arg to the script in which case it should honor the users request. Index: beagled/beagled.in =================================================================== RCS file: /cvs/gnome/beagle/beagled/beagled.in,v retrieving revision 1.19 diff -u -B -r1.19 beagled.in --- beagled/beagled.in 1 Feb 2005 22:07:40 -0000 1.19 +++ beagled/beagled.in 23 Feb 2005 17:02:22 -0000 @@ -43,24 +43,22 @@ export LD_LIBRARY_PATH="/opt/gnome/lib/evolution/2.0:$LD_LIBRARY_PATH" -# Do any necessary processing of the arguments, -# filtering out ones that are only used by this script +# Do any necessary processing of the arguments. fg=$fg_default need_fgbg_arg=1 -declare -a args -while [ $# -gt 0 ]; do - case "$1" in - --fg | --foreground ) fg=1 ; need_fgbg_arg=0 ; shift ;; - --bg | --background ) fg=0 ; need_fgbg_arg=0 ; shift ;; - *) args[${#args[@]}]=$1 ; shift ;; - esac +BEAGLED_ARGS="$*" +for i in $BEAGLED_ARGS; do + case "$i" in + --fg | --foreground ) fg=1 ; need_fgbg_arg=0 ;; + --bg | --background ) fg=0 ; need_fgbg_arg=0 ;; + esac done - -# If necessary, append a --fg or --bg at the end of the command line so that -# the daemon can know whether or not it is running in the background. +# If the user did not make a choice, append a --fg or --bg at the end of the +# command line so that the daemon can know whether or not it is running in +# the background. FGBG_ARG="" if [ $need_fgbg_arg -eq 1 ]; then if [ $fg -eq 1 ]; then @@ -70,7 +68,7 @@ fi fi -CMDLINE="mono --debug $MONO_EXTRA_ARGS $TARGET_EXE $EXTRA_ARGS ${args[@]} $FGBG_ARG" +CMDLINE="mono --debug $MONO_EXTRA_ARGS $TARGET_EXE $EXTRA_ARGS $BEAGLED_ARGS $FGBG_ARG" PROCESS_NAME="mono-beagled"