diff options
author | Volker Lendecke <vlendec@samba.org> | 2001-09-21 13:37:52 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2001-09-21 13:37:52 +0000 |
commit | 21532486d264d2f3ec706994f1f4f98f82765165 (patch) | |
tree | 04bf1b9917a0a56c3a2886352b435df93d7ea568 /source3/utils | |
parent | 80ad52d5c2c389ae8983f57b34a03d8d2d2ddd88 (diff) | |
download | samba-21532486d264d2f3ec706994f1f4f98f82765165.tar.gz samba-21532486d264d2f3ec706994f1f4f98f82765165.tar.bz2 samba-21532486d264d2f3ec706994f1f4f98f82765165.zip |
Added -s configfile to smbcontrol.c.
Volker
(This used to be commit 9ecd9db4efc7b736bef0e01a5e157e149a381587)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/smbcontrol.c | 15 |
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]; |