~ubuntu-branches/ubuntu/karmic/likewise-open/karmic

« back to all changes in this revision

Viewing changes to domainjoin/domainjoin-cli/src/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Rick Clark
  • Date: 2008-08-27 08:56:20 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080827085620-5q0f58b9qtog9myq
Tags: 4.1.0.2956-0ubuntu1
* missing-likewise-logo.diff: removed
* fixed copyright notice
* updated Standards-Version to 3.8.0
* removed path from command in prerm
* removed stop in S runlevel

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    fprintf(stdout, "    --log {.|path}    Log to a file (or \".\" to log to console).\n\n");
59
59
    fprintf(stdout, "  and commands are:\n\n");
60
60
    fprintf(stdout, "    query\n");
61
 
    fprintf(stdout, "    fixfqdn\n");
62
61
    fprintf(stdout, "    setname <computer name>\n");
63
 
    fprintf(stdout, "    join [--enable <module> --disable <module> ...] [--ou <organizationalUnit>] <domain name> <user name> [<password>]\n");
 
62
    fprintf(stdout, "    join [--notimesync] [--enable <module> --disable <module> ...] [--ou <organizationalUnit>] <domain name> <user name> [<password>]\n");
64
63
    fprintf(stdout, "    join [--advanced] --preview [--ou <organizationalUnit>] <domain name>\n");
65
64
    fprintf(stdout, "    join [--ou <organizationalUnit>] --details <module> <domain name>\n");
66
65
    fprintf(stdout, "    leave [--enable <module> --disable <module> ...] [user name] [password]\n");
78
77
    ShowUsage();
79
78
 
80
79
    fprintf(stdout, "  Internal debug commands:\n");
 
80
    fprintf(stdout, "    fixfqdn\n");
81
81
    fprintf(stdout, "    configure pam [--testprefix <dir>] { --enable | --disable }\n");
82
82
    fprintf(stdout, "    configure nsswitch [--testprefix <dir>] { --enable | --disable }\n");
83
83
    fprintf(stdout, "    configure ssh [--testprefix <dir>] { --enable | --disable }\n");
144
144
    return dwEnable == ENABLE_TYPE_ENABLE;
145
145
}
146
146
 
147
 
void PrintWarning(JoinProcessOptions *options, const char *title, const char *message)
 
147
void PrintWarning(const JoinProcessOptions *options, const char *title, const char *message)
148
148
{
149
149
    PSTR      wrapped = NULL;
150
150
    int columns;
291
291
            advanced = TRUE;
292
292
        else if(!strcmp(argv[0], "--preview"))
293
293
            preview = TRUE;
 
294
        else if(!strcmp(argv[0], "--ignore-firewall-ntp"))
 
295
            options.ignoreFirewallNtp = TRUE;
 
296
        else if(!strcmp(argv[0], "--notimesync"))
 
297
            options.disableTimeSync = TRUE;
294
298
        else if(!strcmp(argv[0], "--nohosts"))
295
299
        {
296
300
            PCSTR module = "hostname";
337
341
 
338
342
    if(argc == 3)
339
343
        LW_CLEANUP_CTERR(exc, CTStrdup(argv[2], &options.password));
340
 
    else if(argc == 1 && preview)
 
344
    // The join username is not required in preview or details mode.
 
345
    else if(argc == 1 && (preview || detailModules.size != 0) )
341
346
        ;
342
347
    else if(argc != 2)
343
348
    {
855
860
        LW_TRY(&exc, DoLeaveNew(argc, argv, columns, &LW_EXC));
856
861
    }
857
862
    else if(!strcmp(argv[0], "query"))
858
 
        LW_CLEANUP_CTERR(&exc, DoQuery());
 
863
        LW_TRY(&exc, DoQuery(&LW_EXC));
859
864
    else if(!strcmp(argv[0], "fixfqdn"))
860
865
        LW_CLEANUP_CTERR(&exc, DoFixFqdn());
861
866
    else if(!strcmp(argv[0], "configure"))