1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

the client now loads the smb.conf config file so it can get the

interfaces info, and the workgroup right.
This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 14bae3a0bd
commit fabd4230f1

View File

@ -4171,6 +4171,7 @@ static void usage(char *pname)
pstring query_host; pstring query_host;
BOOL message = False; BOOL message = False;
extern char tar_type; extern char tar_type;
static pstring servicesf = CONFIGFILE;
*query_host = 0; *query_host = 0;
*base_directory = 0; *base_directory = 0;
@ -4244,7 +4245,7 @@ static void usage(char *pname)
setup_term_code (KANJI); setup_term_code (KANJI);
#endif #endif
while ((opt = while ((opt =
getopt(argc, argv,"B:O:M:i:Nn:d:Pp:l:hI:EB:U:L:t:m:W:T:D:c:")) != EOF) getopt(argc, argv,"s:B:O:M:i:Nn:d:Pp:l:hI:EB:U:L:t:m:W:T:D:c:")) != EOF)
switch (opt) switch (opt)
{ {
case 'm': case 'm':
@ -4334,6 +4335,9 @@ static void usage(char *pname)
usage(pname); usage(pname);
exit(0); exit(0);
break; break;
case 's':
strcpy(servicesf, optarg);
break;
case 't': case 't':
#ifdef KANJI #ifdef KANJI
if (!setup_term_code (optarg)) { if (!setup_term_code (optarg)) {
@ -4357,6 +4361,11 @@ static void usage(char *pname)
DEBUG(3,("%s client started (version %s)\n",timestring(),VERSION)); DEBUG(3,("%s client started (version %s)\n",timestring(),VERSION));
if (!lp_load(servicesf,True)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf);
return (-1);
}
load_interfaces(); load_interfaces();
get_myname(*myname?NULL:myname,NULL); get_myname(*myname?NULL:myname,NULL);
strupper(myname); strupper(myname);