Note this email is going to both the lcdproc mailing list and the debian mailing list.
I did what you said, and here is the problem: leko:/etc/init.d#./lcdproc start Starting LCDproc: lcdproc. Invalid parameter: "--contrast Invalid parameter: 200" It seems to be treating the "--contrast 200" differently when its on the command line and when its run from within the script. I don't understand the need for quotation marks in the first place on the command line, that strikes me as a little strange, but given that they are necessary, how can I get around this problem? -Aaron P.S. For those of you on the debian list, the proper command line syntax I'm going for is: #LCDd -d MtxOrb "--contrast 200" my script now looks like this: #! /bin/sh # # skeleton example file to build /etc/init.d/ scripts. # This file should be used to construct scripts for /etc/init.d. # # Written by Miquel van Smoorenburg <[EMAIL PROTECTED]>. # Modified for Debian GNU/Linux # by Ian Murdock <[EMAIL PROTECTED]>. # # Version: @(#)skeleton 1.8 03-Mar-1998 [EMAIL PROTECTED] # PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/local/bin/LCDd CLIENT=/usr/local/bin/lcdproc NAME=lcdproc DESC="LCDproc" test -f $DAEMON || exit 0 cfg=/etc/lcdproc.conf contrast="200" cmdlnc= cmdlnd= if [ -f $cfg ]; then . $cfg if [ "$runatboot" == "no" ]; then exit 0; fi if [ -n "$server" ]; then cmdlnc="$cmdlnc -s $server"; fi if [ -n "$port" ]; then cmdlnc="$cmdlnc -p $port"; fi if [ -n "$driver" ]; then cmdlnd="$cmdlnd -d $driver"; fi if [ -n "$device" ]; then cmdlnd="$cmdlnd -d $device"; fi if [ -n "$contrast" ]; then cmdlnd="$cmdlnd \"--contrast 200\" "; fi if [ -n "$modes" ]; then cmdlnc="$cmdlnc $modes"; fi fi set -e case "$1" in start) echo -n "Starting $DESC: " $DAEMON $cmdlnd & $CLIENT $cmdlnc & echo "$NAME." ;; stop) echo -n "Stopping $DESC: " kill `pidof -o %PPID lcdproc` echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " kill `pidof -o %PPID lcdproc` sleep 1 $DAEMON $cmdline & echo "$NAME." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 [EMAIL PROTECTED] wrote: > > On Sat, 24 Jun 2000, Aaron Solochek wrote: > > ... > > > screen is at. the problem is I envoke LCDd with the following "LCDd -d > > MtxOrb "--contrast 200" " Getting a script to include that quoted > > --contrast statement has prooven quite difficult. I was wondering what > > I can change to fix that? Is there another way to change the contrast? > > ... > > > if [ -n "$contrast" ]; then cmdlnd="$cmdlnd \"--contrast\ 200\" "; fi > > Well, first of all, are you sure that $contrast is getting set? If > $contrast doesn't get set, then cmdlnd="$cmdlnd \"--contrast\ > 200\" " won't get run, so the contrast won't get set. The -n will test > false if $contrast is a zero-length string. > > Try adding a $contrast="foo" just before that part. > > Also, I don't think it's related to the problem, but I don't think you > need the '\' before a space in a quoted string. When I tried it, the > backslash got included in the string. > > -- > Dale Osowski > [EMAIL PROTECTED] > > ----------------------------------------------------------- > To unsubscribe from this list send a blank message to > [EMAIL PROTECTED]