1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

Added -s configfile to smbcontrol.c.

Volker
(This used to be commit 9ecd9db4ef)
This commit is contained in:
Volker Lendecke 2001-09-21 13:37:52 +00:00
parent 80ad52d5c2
commit 21532486d2

View File

@ -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];