- Timestamp:
- Jul 27, 2017 3:16:23 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/Makefile.kmk
r67323 r68140 192 192 VBOX_MANUAL_XML_REFENTRY_FILES = \ 193 193 man_VBoxManage-debugvm.xml \ 194 man_VBoxManage-extpack.xml 194 man_VBoxManage-extpack.xml \ 195 man_VBoxManage-unattended.xml 195 196 196 197 -
trunk/doc/manual/en_US/man_VBoxManage-unattended.xml
r68030 r68140 37 37 38 38 <refsynopsisdiv> 39 <cmdsynopsis id="synopsis-vboxmanage-unattended"> <!-- The 'id' is mandatory and must start with 'synopsis-'. --> 40 <command>VBoxManage unattended</command> 39 <cmdsynopsis id="synopsis-vboxmanage-unattended-detect"> <!-- The 'id' is mandatory and must start with 'synopsis-'. --> 40 <command>VBoxManage unattended detect</command> 41 <arg choice="req">--iso=<replaceable>install-iso</replaceable></arg> 42 <arg>--machine-readable</arg> 43 </cmdsynopsis> 44 <cmdsynopsis id="synopsis-vboxmanage-unattended-install"> <!-- The 'id' is mandatory and must start with 'synopsis-'. --> 45 <command>VBoxManage unattended install</command> 41 46 <arg choice="req"><replaceable>uuid|vmname</replaceable></arg> 42 <arg choice="req">--iso-path=<replaceable>install-iso</replaceable></arg> 47 <arg choice="req">--iso=<replaceable>install-iso</replaceable></arg> 48 <arg choice="req">incomplete</arg> 43 49 </cmdsynopsis> 44 50 </refsynopsisdiv> … … 47 53 <title>Description</title> 48 54 49 <refsect2 id="vboxmanage-unattended ">50 <title>unattended installation</title>55 <refsect2 id="vboxmanage-unattended-detect"> 56 <title>unattended detect</title> 51 57 <remark role="help-copy-synopsis"/> 52 58 <para> 53 docs. 59 Detects the guest operating system (OS) on the specified installation ISO 60 and displays the result. This can be used as input when creating a VM for 61 the ISO to be installed in. 62 </para> 63 <variablelist> 64 <varlistentry> 65 <term><option>--iso=<replaceable>install-iso</replaceable></option></term> 66 <listitem><para>The installation ISO to run the detection on.</para></listitem> 67 </varlistentry> 68 <varlistentry> 69 <term><option>--machine-readable</option></term> 70 <listitem><para>Produce output that is simpler to parse from a script.</para></listitem> 71 </varlistentry> 72 </variablelist> 73 </refsect2> 74 75 <refsect2 id="vboxmanage-unattended-install"> 76 <title>unattended install</title> 77 <remark role="help-copy-synopsis"/> 78 <para> 79 Reconfigures the specified VM for installation and optionally starts it up. 54 80 </para> 55 81 <variablelist> … … 58 84 <listitem><para>Either the UUID or the name (case sensitive) of a VM.</para></listitem> 59 85 </varlistentry> 86 <varlistentry> 87 <term><option>--iso=<replaceable>install-iso</replaceable></option></term> 88 <listitem><para>The installation ISO to run the detection on.</para></listitem> 89 </varlistentry> 90 <!-- a lot more stuff here to document. --> 60 91 </variablelist> 61 92 </refsect2> -
trunk/doc/manual/en_US/user_VBoxManage.xml
r67240 r68140 2687 2687 </sect1> 2688 2688 2689 <sect1 id="vboxmanage-unattended">2690 <title>VBoxManage unattended</title>2691 2692 <para>The <computeroutput>unattended</computeroutput> subcommand allows you to run unattended2693 guest installation from the command line.2694 User is able to choose passing the settings for unattended installation via:2695 <itemizedlist>2696 <listitem>2697 <para>passing the data via a file with prepared settings using2698 <computeroutput>VBoxManage unattended usefile</computeroutput>2699 </para>2700 <itemizedlist>2701 <listitem>2702 <para><computeroutput>--settingfile2703 <file></computeroutput>:2704 specifies a file with all settings needed for unattended installation. </para>2705 </listitem>2706 </itemizedlist>2707 2708 <para>In this case correctness of all settings and data lays upon on the user.</para>2709 2710 </listitem>2711 2712 <listitem>2713 <para>the command line using2714 <computeroutput>VBoxManage unattended usedata</computeroutput></para>2715 <para>Command line settings are:</para>2716 <itemizedlist>2717 <listitem>2718 <para><computeroutput>--user2719 <user name></computeroutput>:2720 specifies a login name for the guest OS. </para>2721 </listitem>2722 2723 <listitem>2724 <para><computeroutput>--password2725 <password></computeroutput>:2726 user's password for the logging to the guest OS. </para>2727 </listitem>2728 2729 <listitem>2730 <para><computeroutput>--key2731 <key></computeroutput>:2732 product key for validating the installed OS. </para>2733 </listitem>2734 2735 <listitem>2736 <para><computeroutput>--isopath2737 <OS ISO path></computeroutput>:2738 CD\DVD disk or ISO image with OS installation data. </para>2739 </listitem>2740 2741 <listitem>2742 <para><computeroutput>--addisopath2743 <additions ISO path></computeroutput>:2744 ISO image with Virtualbox additions. Optional. </para>2745 </listitem>2746 2747 <listitem>2748 <para><computeroutput>--imageindex2749 <number></computeroutput>:2750 The installation disk can contains the several images of OS (for example 32bits and 64bits systems).2751 At moment used only for Windows OS installation. Optional.2752 </para>2753 </listitem>2754 2755 </itemizedlist>2756 </listitem>2757 </itemizedlist>2758 </para>2759 2760 <para>The setting file has a simple structure as "key equal sign value".2761 One key is one line, at moment there are eight settings which supported by the command:2762 <itemizedlist>2763 <listitem>2764 <para><computeroutput>2765 username</computeroutput>:2766 See above description for "--username"</para>2767 </listitem>2768 2769 <listitem>2770 <para><computeroutput>2771 password</computeroutput>:2772 See above description for "--password"</para>2773 </listitem>2774 2775 <listitem>2776 <para><computeroutput>2777 key</computeroutput>:2778 See above description for "--key"</para>2779 </listitem>2780 2781 <listitem>2782 <para><computeroutput>2783 installation_iso</computeroutput>:2784 See above description for "--isopath"</para>2785 </listitem>2786 2787 <listitem>2788 <para><computeroutput>2789 addition_iso</computeroutput>:2790 See above description for "--addisopath"</para>2791 </listitem>2792 2793 <listitem>2794 <para><computeroutput>2795 aux_iso</computeroutput>:2796 Auxiliary CD disk which can be used during installation as simple bootable CD with unattended script on it.2797 Generally used for Linux installation.</para>2798 </listitem>2799 2800 <listitem>2801 <para><computeroutput>2802 aux_floppy</computeroutput>:2803 Auxiliary floppy disk which can be used during installation as source of unattended script used by the installer.2804 Generally used for Windows installation.2805 </para>2806 </listitem>2807 2808 <listitem>2809 <para><computeroutput>2810 image_index</computeroutput>:2811 See above description for "--imageindex".</para>2812 </listitem>2813 </itemizedlist>2814 <note>2815 <para>The most of parameters are the same parameters as passed via the command line2816 and two of them are related to two items which can be created on the fly during installation (it's auxiliary floppy and CD).2817 </para>2818 </note>2819 </para>2820 2821 <para>2822 Example "VBoxManage unattended usedata":2823 </para>2824 <para>2825 <computeroutput>2826 VBoxManage unattended 2a524618-dd30-4168-bd53-645d9d72bb25 usedata2827 --user smith2828 --password smile2829 --isopath /path/to/the/distributive/ubuntu-16.04.1-server-amd64.iso2830 --addisopath /path/to/Virtualbox/additions/VBoxGuestAdditions.iso2831 </computeroutput>2832 </para>2833 2834 <para>2835 Example "VBoxManage unattended usefile":2836 </para>2837 <para><computeroutput>2838 VBoxManage unattended 2a524618-dd30-4168-bd53-645d9d72bb25 usefile2839 --settingfile /path/to/the/file/unattended_settings.txt2840 </computeroutput></para>2841 2842 </sect1>2843 2844 2689 <sect1> 2845 2690 <title>VBoxManage discardstate</title> … … 5943 5788 5944 5789 5945 <xi:include href="user_man_VBoxManage-debugvm.xml" xpointer="element(/1)" 5946 xmlns:xi="http://www.w3.org/2001/XInclude" /> 5947 5948 <xi:include href="user_man_VBoxManage-extpack.xml" xpointer="element(/1)" 5949 xmlns:xi="http://www.w3.org/2001/XInclude" /> 5790 <xi:include href="user_man_VBoxManage-debugvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> 5791 <xi:include href="user_man_VBoxManage-extpack.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> 5792 <xi:include href="user_man_VBoxManage-unattended.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> 5950 5793 </chapter> -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r64997 r68140 120 120 { "startvm", USAGE_STARTVM, VBMG_CMD_TODO, handleStartVM, 0 }, 121 121 { "controlvm", USAGE_CONTROLVM, VBMG_CMD_TODO, handleControlVM, 0 }, 122 { "unattended", USAGE_UNATTENDEDINSTALL, VBMG_CMD_TODO, handleUnattendedInstall, 0 },122 { "unattended", USAGE_UNATTENDEDINSTALL, HELP_CMD_UNATTENDED, handleUnattended, 0 }, 123 123 { "discardstate", USAGE_DISCARDSTATE, VBMG_CMD_TODO, handleDiscardState, 0 }, 124 124 { "adoptstate", USAGE_ADOPTSTATE, VBMG_CMD_TODO, handleAdoptState, 0 }, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r65049 r68140 216 216 /* VBoxManageControlVM.cpp */ 217 217 RTEXITCODE handleControlVM(HandlerArg *a); 218 RTEXITCODE handleUnattendedInstall(HandlerArg *a);219 218 #ifndef VBOX_ONLY_DOCS 220 219 unsigned int getMaxNics(IVirtualBox* vbox, IMachine* mach); … … 277 276 RTEXITCODE handleSharedFolder(HandlerArg *a); 278 277 RTEXITCODE handleExtPack(HandlerArg *a); 278 RTEXITCODE handleUnattended(HandlerArg *a); 279 279 280 280 /* VBoxManageDisk.cpp */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r68055 r68140 1021 1021 } 1022 1022 1023 if (fCategory & USAGE_UNATTENDEDINSTALL)1024 RTStrmPrintf(pStrm, /* This will be replaced by a docbook man page. */1025 "%s unattended %s <uuid|vmname>\n"1026 " <OUTDATED-TODO> --settings-file <file>\n"1027 " <OUTDATED-TODO> [--session-type <type>]\n"1028 "%s unattended %s <uuid|vmname>\n"1029 " <OUTDATED-TODO> --user <user>\n"1030 " <OUTDATED-TODO> --password <password>\n"1031 " <OUTDATED-TODO> --iso-path <path>\n"1032 " <OUTDATED-TODO> [--key <CD-key>]\n"1033 " <OUTDATED-TODO> [--additions-iso-path <path>]\n"1034 " <OUTDATED-TODO> [--install-additions]\n"1035 " <OUTDATED-TODO> [--image-index <index>]\n"1036 " <OUTDATED-TODO> [--session-type <type>]\n"1037 "\n", SEP, SEP);1038 1039 1023 if (fCategory & USAGE_DISCARDSTATE) 1040 1024 RTStrmPrintf(pStrm, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
r68135 r68140 5 5 6 6 /* 7 * Copyright (C) 2006-201 6Oracle Corporation7 * Copyright (C) 2006-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1268 1268 } 1269 1269 1270 RTEXITCODE handleUnattendedDetect(HandlerArg *a) 1271 { 1272 HRESULT hrc; 1273 1274 /* 1275 * Options. We work directly on an IUnattended instace while parsing 1276 * the options. This saves a lot of extra clutter. 1277 */ 1278 bool fMachineReadable = false; 1279 char szIsoPath[RTPATH_MAX]; 1280 szIsoPath[0] = '\0'; 1281 1282 /* 1283 * Parse options. 1284 */ 1285 static const RTGETOPTDEF s_aOptions[] = 1286 { 1287 { "--iso", 'i', RTGETOPT_REQ_STRING }, 1288 { "--machine-readable", 'M', RTGETOPT_REQ_NOTHING }, 1289 }; 1290 1291 RTGETOPTSTATE GetState; 1292 int vrc = RTGetOptInit(&GetState, a->argc, a->argv, s_aOptions, RT_ELEMENTS(s_aOptions), 0, RTGETOPTINIT_FLAGS_OPTS_FIRST); 1293 AssertRCReturn(vrc, RTEXITCODE_FAILURE); 1294 1295 int c; 1296 RTGETOPTUNION ValueUnion; 1297 while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0) 1298 { 1299 switch (c) 1300 { 1301 case 'i': // --iso 1302 vrc = RTPathAbs(ValueUnion.psz, szIsoPath, sizeof(szIsoPath)); 1303 if (RT_FAILURE(vrc)) 1304 return errorSyntax("RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc); 1305 break; 1306 1307 case 'M': // --machine-readable. 1308 fMachineReadable = true; 1309 break; 1310 1311 default: 1312 return errorGetOpt(c, &ValueUnion); 1313 } 1314 } 1315 1316 /* 1317 * Check for required stuff. 1318 */ 1319 if (szIsoPath[0] == '\0') 1320 return errorSyntax("No ISO specified"); 1321 1322 /* 1323 * Do the job. 1324 */ 1325 ComPtr<IUnattended> ptrUnattended; 1326 CHECK_ERROR2_RET(hrc, a->virtualBox, CreateUnattendedInstaller(ptrUnattended.asOutParam()), RTEXITCODE_FAILURE); 1327 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(IsoPath)(Bstr(szIsoPath).raw()), RTEXITCODE_FAILURE); 1328 CHECK_ERROR2_RET(hrc, ptrUnattended, DetectIsoOS(), RTEXITCODE_FAILURE); 1329 1330 /* 1331 * Retrieve the results. 1332 */ 1333 Bstr bstrDetectedOSTypeId; 1334 CHECK_ERROR2_RET(hrc, ptrUnattended, COMGETTER(DetectedOSTypeId)(bstrDetectedOSTypeId.asOutParam()), RTEXITCODE_FAILURE); 1335 Bstr bstrDetectedVersion; 1336 CHECK_ERROR2_RET(hrc, ptrUnattended, COMGETTER(DetectedOSVersion)(bstrDetectedVersion.asOutParam()), RTEXITCODE_FAILURE); 1337 Bstr bstrDetectedFlavor; 1338 CHECK_ERROR2_RET(hrc, ptrUnattended, COMGETTER(DetectedOSFlavor)(bstrDetectedFlavor.asOutParam()), RTEXITCODE_FAILURE); 1339 Bstr bstrDetectedHints; 1340 CHECK_ERROR2_RET(hrc, ptrUnattended, COMGETTER(DetectedOSHints)(bstrDetectedHints.asOutParam()), RTEXITCODE_FAILURE); 1341 if (fMachineReadable) 1342 RTPrintf("OSTypeId=\"%ls\"\n" 1343 "OSVersion=\"%ls\"\n" 1344 "OSFlavor=\"%ls\"\n" 1345 "OSHints=\"%ls\"\n", 1346 bstrDetectedOSTypeId.raw(), 1347 bstrDetectedVersion.raw(), 1348 bstrDetectedFlavor.raw(), 1349 bstrDetectedHints.raw()); 1350 else 1351 { 1352 RTMsgInfo("Detected '%s' to be:\n", szIsoPath); 1353 RTPrintf(" OS TypeId = %ls\n" 1354 " OS Version = %ls\n" 1355 " OS Flavor = %ls\n" 1356 " OS Hints = %ls\n", 1357 bstrDetectedOSTypeId.raw(), 1358 bstrDetectedVersion.raw(), 1359 bstrDetectedFlavor.raw(), 1360 bstrDetectedHints.raw()); 1361 } 1362 1363 return RTEXITCODE_SUCCESS; 1364 } 1365 1270 1366 RTEXITCODE handleUnattendedInstall(HandlerArg *a) 1271 1367 { … … 1281 1377 RTCList<RTCString> arrPackageSelectionAdjustments; 1282 1378 ComPtr<IMachine> ptrMachine; 1379 bool fDryRun = false; 1283 1380 const char *pszSessionType = "headless"; 1284 1381 … … 1286 1383 * Parse options. 1287 1384 */ 1288 if (a->argc <= 1)1289 return errorSyntax(USAGE_UNATTENDEDINSTALL, "Missing VM name/UUID.");1290 1291 1385 static const RTGETOPTDEF s_aOptions[] = 1292 1386 { … … 1308 1402 { "--hostname", 'H', RTGETOPT_REQ_STRING }, 1309 1403 { "--package-selection-adjustment", 's', RTGETOPT_REQ_STRING }, 1404 { "--dry-run", 'D', RTGETOPT_REQ_NOTHING }, 1310 1405 // advance options: 1311 1406 { "--auxiliary-base-path", 'x', RTGETOPT_REQ_STRING }, … … 1331 1426 case VINF_GETOPT_NOT_OPTION: 1332 1427 if (ptrMachine.isNotNull()) 1333 return errorSyntax( USAGE_UNATTENDEDINSTALL,"VM name/UUID given more than once!");1428 return errorSyntax("VM name/UUID given more than once!"); 1334 1429 CHECK_ERROR2_RET(hrc, a->virtualBox, FindMachine(Bstr(ValueUnion.psz).raw(), ptrMachine.asOutParam()), RTEXITCODE_FAILURE); 1335 1430 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(Machine)(ptrMachine), RTEXITCODE_FAILURE); … … 1339 1434 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1340 1435 if (RT_FAILURE(vrc)) 1341 return errorSyntax( USAGE_UNATTENDEDINSTALL,"RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1436 return errorSyntax("RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc); 1342 1437 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(IsoPath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1343 1438 break; … … 1368 1463 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1369 1464 if (RT_FAILURE(vrc)) 1370 return errorSyntax( USAGE_UNATTENDEDINSTALL,"RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1465 return errorSyntax("RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc); 1371 1466 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(AdditionsIsoPath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1372 1467 break; … … 1381 1476 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1382 1477 if (RT_FAILURE(vrc)) 1383 return errorSyntax( USAGE_UNATTENDEDINSTALL,"RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1478 return errorSyntax("RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc); 1384 1479 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(ValidationKitIsoPath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1385 1480 break; … … 1407 1502 case 's': // --package-selection-adjustment 1408 1503 arrPackageSelectionAdjustments.append(ValueUnion.psz); 1504 break; 1505 1506 case 'D': 1507 fDryRun = true; 1409 1508 break; 1410 1509 … … 1412 1511 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1413 1512 if (RT_FAILURE(vrc)) 1414 return errorSyntax( USAGE_UNATTENDEDINSTALL,"RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1513 return errorSyntax("RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc); 1415 1514 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(AuxiliaryBasePath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1416 1515 break; … … 1423 1522 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1424 1523 if (RT_FAILURE(vrc)) 1425 return errorSyntax( USAGE_UNATTENDEDINSTALL,"RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1524 return errorSyntax("RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc); 1426 1525 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(ScriptTemplatePath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1427 1526 break; … … 1430 1529 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1431 1530 if (RT_FAILURE(vrc)) 1432 return errorSyntax( USAGE_UNATTENDEDINSTALL,"RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1531 return errorSyntax("RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc); 1433 1532 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(PostInstallScriptTemplatePath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1434 1533 break; … … 1447 1546 1448 1547 default: 1449 return errorGetOpt( USAGE_UNATTENDEDINSTALL,c, &ValueUnion);1548 return errorGetOpt(c, &ValueUnion); 1450 1549 } 1451 1550 } … … 1455 1554 */ 1456 1555 if (ptrMachine.isNull()) 1457 return errorSyntax( USAGE_UNATTENDEDINSTALL,"Missing VM name/UUID");1556 return errorSyntax("Missing VM name/UUID"); 1458 1557 1459 1558 /* … … 1504 1603 1505 1604 CHECK_ERROR2_RET(hrc, ptrUnattended,Prepare(), RTEXITCODE_FAILURE); 1506 CHECK_ERROR2_RET(hrc, ptrUnattended,ConstructMedia(), RTEXITCODE_FAILURE); 1507 CHECK_ERROR2_RET(hrc, ptrUnattended,ReconfigureVM(), RTEXITCODE_FAILURE); 1605 if (!fDryRun) 1606 { 1607 CHECK_ERROR2_RET(hrc, ptrUnattended, ConstructMedia(), RTEXITCODE_FAILURE); 1608 CHECK_ERROR2_RET(hrc, ptrUnattended,ReconfigureVM(), RTEXITCODE_FAILURE); 1609 } 1508 1610 1509 1611 /* … … 1563 1665 * Start the VM if requested. 1564 1666 */ 1565 if (RTStrICmp(pszSessionType, "none") == 0) 1667 if ( fDryRun 1668 || RTStrICmp(pszSessionType, "none") == 0) 1566 1669 hrc = S_OK; 1567 1670 else … … 1617 1720 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 1618 1721 } 1722 1723 1724 RTEXITCODE handleUnattended(HandlerArg *a) 1725 { 1726 /* 1727 * Sub-command switch. 1728 */ 1729 if (a->argc < 1) 1730 return errorNoSubcommand(); 1731 1732 if (!strcmp(a->argv[0], "detect")) 1733 { 1734 setCurrentSubcommand(HELP_SCOPE_UNATTENDED_DETECT); 1735 return handleUnattendedDetect(a); 1736 } 1737 1738 if (!strcmp(a->argv[0], "install")) 1739 { 1740 setCurrentSubcommand(HELP_SCOPE_UNATTENDED_INSTALL); 1741 return handleUnattendedInstall(a); 1742 } 1743 1744 /* Consider some kind of create-vm-and-install-guest-os command. */ 1745 return errorUnknownSubcommand(a->argv[0]); 1746 }
Note:
See TracChangeset
for help on using the changeset viewer.