From 21532486d264d2f3ec706994f1f4f98f82765165 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 21 Sep 2001 13:37:52 +0000 Subject: Added -s configfile to smbcontrol.c. Volker (This used to be commit 9ecd9db4efc7b736bef0e01a5e157e149a381587) --- source3/utils/smbcontrol.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'source3') 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 \n\n"); } else { printf(" \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]; -- cgit