At long last.
{ "config", required_argument, 0, 'c' },
{ "debug", no_argument, 0, 'd' },
{ "local", no_argument, 0, 'l' },
+ { "user-config", required_argument, 0, 'u' },
{ "no-per-user-config", no_argument, 0, 'N' },
{ "help-commands", no_argument, 0, 'H' },
{ "user", required_argument, 0, 'U' },
" --help, -h Display usage message\n"
" --help-commands, -H List commands\n"
" --version, -V Display version number\n"
- " --config PATH, -c PATH Set configuration file\n"
+ " --config PATH, -c PATH Set system configuration file\n"
+ " --user-config PATH, -u PATH Set user configuration file\n"
" --local, -l Force connection to local server\n"
" --debug, -d Turn on debugging\n");
xfclose(stdout);
regexp_setup();
if(!setlocale(LC_CTYPE, "")) disorder_fatal(errno, "error calling setlocale");
if(!setlocale(LC_TIME, "")) disorder_fatal(errno, "error calling setlocale");
- while((n = getopt_long(argc, argv, "+hVc:dHl", options, 0)) >= 0) {
+ while((n = getopt_long(argc, argv, "+hVc:dHlu:", options, 0)) >= 0) {
switch(n) {
case 'h': help();
case 'H': help_commands();
case 'V': version("disorder");
case 'c': configfile = optarg; break;
+ case 'u': userconfigfile = optarg; break;
case 'd': debugging = 1; break;
case 'l': local = 1; break;
case 'N': config_per_user = 0; break;
{ "pause-mode", required_argument, 0, 'P' },
{ "socket", required_argument, 0, 's' },
{ "config", required_argument, 0, 'C' },
+ { "user-config", required_argument, 0, 'u' },
{ "monitor", no_argument, 0, 'M' },
{ 0, 0, 0, 0 }
};
" --min, -m FRAMES Buffer low water mark\n"
" --max, -x FRAMES Buffer maximum size\n"
" --rcvbuf, -R BYTES Socket receive buffer size\n"
- " --config, -C PATH Set configuration file\n"
+ " --config, -C PATH Set system configuration file\n"
+ " --user-config, -u PATH Set user configuration file\n"
" --api, -A API Select audio API. Possibilities:\n"
" ");
int first = 1;
logdate = 1;
mem_init();
if(!setlocale(LC_CTYPE, "")) disorder_fatal(errno, "error calling setlocale");
- while((n = getopt_long(argc, argv, "hVdD:m:x:L:R:aocC:re:P:MA:", options, 0)) >= 0) {
+ while((n = getopt_long(argc, argv, "hVdD:m:x:L:R:aocC:u:re:P:MA:", options, 0)) >= 0) {
switch(n) {
case 'h': help();
case 'V': version("disorder-playrtp");
#endif
case 'A': backend = uaudio_find(optarg); break;
case 'C': configfile = optarg; break;
+ case 'u': userconfigfile = optarg; break;
case 's': control_socket = optarg; break;
case 'r': dumpfile = optarg; break;
case 'e': backend = &uaudio_command; uaudio_set("command", optarg); break;
{ "help", no_argument, 0, 'h' },
{ "version", no_argument, 0, 'V' },
{ "config", required_argument, 0, 'c' },
+ { "user-config", required_argument, 0, 'u' },
{ "tufnel", no_argument, 0, 't' },
{ "debug", no_argument, 0, 'd' },
{ 0, 0, 0, 0 }
"Options:\n"
" --help, -h Display usage message\n"
" --version, -V Display version number\n"
- " --config PATH, -c PATH Set configuration file\n"
+ " --config PATH, -c PATH Set system configuration file\n"
+ " --user-config PATH, -u PATH Set user configuration file\n"
" --debug, -d Turn on debugging\n"
"\n"
"Also GTK+ options will work.\n");
regexp_setup();
if(!setlocale(LC_CTYPE, "")) disorder_fatal(errno, "error calling setlocale");
gtkok = gtk_init_check(&argc, &argv);
- while((n = getopt_long(argc, argv, "hVc:dt", options, 0)) >= 0) {
+ while((n = getopt_long(argc, argv, "hVc:dtu:", options, 0)) >= 0) {
switch(n) {
case 'h': help();
case 'V': version("disobedience");
case 'c': configfile = optarg; break;
+ case 'u': userconfigfile = optarg; break;
case 'd': debugging = 1; break;
case 't': goesupto = 11; break;
default: disorder_fatal(0, "invalid option");
environment variable, defaulting to
.IR pkgconfdir/config .
.TP
+.B \-\-user-config \fIPATH\fR, \fB\-u \fIPATH
+Set the user configuration file.
+THe default is given by the
+.B DISORDER_USERCONFIG
+environment variable, defaulting to
+.IR $HOME/.disorder/passwd .
+.TP
.B \-\-debug\fR, \fB\-d
Enable debugging.
.TP
control.
.TP
.B \-\-config \fIPATH\fR, \fB\-C \fIPATH
-Set the configuration file.
+Set the system configuration file.
The default is
given by the
.B DISORDER_CONFIG
environment variable, defaulting to
.IR pkgconfdir/config .
.TP
+.B \-\-user-config \fIPATH\fR, \fB\-u \fIPATH
+Set the user configuration file.
+THe default is given by the
+.B DISORDER_USERCONFIG
+environment variable, defaulting to
+.IR $HOME/.disorder/passwd .
+.TP
.B \-\-socket \fIPATH\fR, \fB\-s \fIPATH
Set the control socket.
Normally this would not be used manually.
.SH OPTIONS
.TP
.B \-\-config \fIPATH\fR, \fB\-c \fIPATH
-Set the configuration file.
+Set the system configuration file.
The default is
given by the
.B DISORDER_CONFIG
environment variable, defaulting to
.IR pkgconfdir/config .
.TP
+.B \-\-user-config \fIPATH\fR, \fB\-u \fIPATH
+Set the user configuration file.
+THe default is given by the
+.B DISORDER_USERCONFIG
+environment variable, defaulting to
+.IR $HOME/.disorder/passwd .
+.TP
.B \-\-debug\fR, \fB\-d
Enable debugging.
.TP
.B DISORDER_USERCONFIG
Per-user configuration file to use instead of
.BR $DISORDER_HOME/passwd .
+Overridden by the
+.B \-u
+.RB ( \-\-user-config )
+command-line option.
.TP
.B DISORDER_USERCONFIG_SYS
System-provided per-user configuration file to use instead of
Or
.BR $DISORDER_USERCONFIG ,
if that's set; else
-.BR $DISORDER_HOME/passwd .
+.BR $DISORDER_HOME/passwd ;
+overridden by
+.B \-u
+.RB ( \-\-user-config )
+command-line option.
Per-user client configuration.
Optional but if it exists must be readable only by the relevant user.
Would normally contain a \fBpassword\fR directive.