summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/utils/smbcontrol.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 40892ba1c0..2b682d9860 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -46,7 +46,7 @@ static void usage(BOOL doexit)
{
int i;
if (doexit) {
- printf("Usage: smbcontrol -i\n");
+ printf("Usage: smbcontrol -i -s configfile\n");
printf(" smbcontrol <destination> <message-type> <parameters>\n\n");
} else {
printf("<destination> <message-type> <parameters>\n\n");
@@ -380,23 +380,26 @@ static BOOL do_command(char *dest, char *msg_name, char **params)
TimeInit();
setup_logging(argv[0],True);
- lp_load(servicesf,False,False,False);
-
- if (!message_init()) exit(1);
-
if (argc < 2) usage(True);
- while ((opt = getopt(argc, argv,"i")) != EOF) {
+ while ((opt = getopt(argc, argv,"is:")) != EOF) {
switch (opt) {
case 'i':
interactive = True;
break;
+ case 's':
+ pstrcpy(servicesf, optarg);
+ break;
default:
printf("Unknown option %c (%d)\n", (char)opt, opt);
usage(True);
}
}
+ lp_load(servicesf,False,False,False);
+
+ if (!message_init()) exit(1);
+
argc -= optind;
argv = &argv[optind];