make option -f not take arguments in the server
This commit is contained in:
+7
-6
@@ -5,10 +5,9 @@ LCDd - LCDproc server daemon
|
|||||||
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B LCDd
|
.B LCDd
|
||||||
[\fB\-h\fP]
|
[\fB\-hf\fP]
|
||||||
[\fB\-c\fP \fIconfig\fP]
|
[\fB\-c\fP \fIconfig\fP]
|
||||||
[\fB\-d\fP \fIdriver\fP]
|
[\fB\-d\fP \fIdriver\fP]
|
||||||
[\fB\-f\fP \fIbool\fP]
|
|
||||||
[\fB\-i\fP \fIbool\fP]
|
[\fB\-i\fP \fIbool\fP]
|
||||||
[\fB\-a\fP \fIaddr\fP]
|
[\fB\-a\fP \fIaddr\fP]
|
||||||
[\fB\-p\fP \fIport\fP]
|
[\fB\-p\fP \fIport\fP]
|
||||||
@@ -44,9 +43,11 @@ Use a configuration file other than @SYSCONFDIR@/LCDd.conf
|
|||||||
Specify a driver to use (output only to first), overriding
|
Specify a driver to use (output only to first), overriding
|
||||||
the \fBDriver\fP parameter in the config file's \fB[Server]\fP section.
|
the \fBDriver\fP parameter in the config file's \fB[Server]\fP section.
|
||||||
.TP
|
.TP
|
||||||
.B \-f \fIbool\fp
|
.B \-f
|
||||||
Tell whether to run in the foreground (\fI1\fP) or background (\fI0\fP),
|
Run LCDd in foreground, overriding the \fBForeground\fP parameter
|
||||||
overriding the \fBForeground\fP parameter in the config file's \fB[Server]\fP section.
|
in the config file's \fB[Server]\fP section.
|
||||||
|
The default, if not in the config file or without a config file, is to
|
||||||
|
daemonize \fBLCDd\fP as it is intended to operate in the background.
|
||||||
.TP
|
.TP
|
||||||
.B \-i \fIbool\fP
|
.B \-i \fIbool\fP
|
||||||
Tell whether the to enable (\fI1\fP) or disable (\fI0\fP) showing the LCDproc
|
Tell whether the to enable (\fI1\fP) or disable (\fI0\fP) showing the LCDproc
|
||||||
@@ -437,7 +438,7 @@ If LCDd seems not to work as expected, try to run it with reporting level set to
|
|||||||
reporting to stderr and running it in the foreground.
|
reporting to stderr and running it in the foreground.
|
||||||
This can be achieved without changes to the config file by using the following command line:
|
This can be achieved without changes to the config file by using the following command line:
|
||||||
.RS
|
.RS
|
||||||
.I LCDd -f 1 -r 5 -s 0
|
.I LCDd -f -r 5 -s 0
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.SH FILES
|
.SH FILES
|
||||||
|
|||||||
+1
-3
@@ -5,13 +5,11 @@ lcdproc - system status information client
|
|||||||
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B lcdproc
|
.B lcdproc
|
||||||
|
[\fB\-hfv\fP]
|
||||||
[\fB\-c\fP \fIconfig\fP]
|
[\fB\-c\fP \fIconfig\fP]
|
||||||
[\fB\-s\fP \fIhost\fP]
|
[\fB\-s\fP \fIhost\fP]
|
||||||
[\fB\-p\fP \fIport\fP]
|
[\fB\-p\fP \fIport\fP]
|
||||||
[\fB\-e\fP \fIdelay\fP]
|
[\fB\-e\fP \fIdelay\fP]
|
||||||
[\fB\-f\fP]
|
|
||||||
[\fB\-h\fP]
|
|
||||||
[\fB\-v\fP]
|
|
||||||
[\fIscreen\fP ...]
|
[\fIscreen\fP ...]
|
||||||
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ test -x ${LCDd} || exit 0
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
printf "Starting $DESC:"
|
printf "Starting $DESC:"
|
||||||
start-stop-daemon --start --quiet --background --exec ${LCDd} -- -s -f -c ${configfile}
|
start-stop-daemon --start --quiet --background --exec ${LCDd} -- -c ${configfile}
|
||||||
printf " LCDd"
|
printf " LCDd"
|
||||||
printf ".\n"
|
printf ".\n"
|
||||||
;;
|
;;
|
||||||
|
|||||||
+2
-8
@@ -301,7 +301,7 @@ process_command_line(int argc, char **argv)
|
|||||||
|
|
||||||
/* Analyze options here.. (please try to keep list of options the
|
/* Analyze options here.. (please try to keep list of options the
|
||||||
* same everywhere) */
|
* same everywhere) */
|
||||||
while ((c = getopt(argc, argv, "hc:d:f:a:p:u:w:s:r:i:" )) > 0) {
|
while ((c = getopt(argc, argv, "hc:d:fa:p:u:w:s:r:i:" )) > 0) {
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case 'h':
|
case 'h':
|
||||||
help = 1; /* Continue to process the other
|
help = 1; /* Continue to process the other
|
||||||
@@ -328,13 +328,7 @@ process_command_line(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
b = interpret_boolean_arg( optarg );
|
foreground_mode = 1;
|
||||||
if( b == -1 ) {
|
|
||||||
report( RPT_ERR, "Not a boolean value: '%s'", optarg );
|
|
||||||
e = -1;
|
|
||||||
} else {
|
|
||||||
foreground_mode = b;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
strncpy(bind_addr, optarg, sizeof(bind_addr));
|
strncpy(bind_addr, optarg, sizeof(bind_addr));
|
||||||
|
|||||||
Reference in New Issue
Block a user