LCDproc development and user support list

Text archives Help

[lcdproc] problem with contrast

Chronological Thread 
  • From: leko AT MIT.EDU (Aaron Solochek)
  • Subject: [lcdproc] problem with contrast
  • Date: Sat, 24 Jun 2000 14:29:26 -0400

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?


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
# Written by Miquel van Smoorenburg
<miquels AT>.
# Modified for Debian GNU/Linux
# by Ian Murdock
<imurdock AT>.
# Version: @(#)skeleton 1.8 03-Mar-1998
miquels AT


test -f $DAEMON || exit 0

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

set -e

case "$1" in
echo -n "Starting $DESC: "
$DAEMON $cmdlnd &
$CLIENT $cmdlnc &
echo "$NAME."
echo -n "Stopping $DESC: "
kill `pidof -o %PPID lcdproc`
echo "$NAME."
echo -n "Restarting $DESC: "
kill `pidof -o %PPID lcdproc`
sleep 1
$DAEMON $cmdline &
echo "$NAME."
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1

exit 0

osowski AT
> 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
> osowski AT
> -----------------------------------------------------------
> To unsubscribe from this list send a blank message to
> lcdproc-unsubscribe AT

To unsubscribe from this list send a blank message to
lcdproc-unsubscribe AT

Archive powered by MHonArc 2.6.18.

Top of page