Changeset 94532 in vbox
- Timestamp:
- Apr 8, 2022 4:28:32 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 150883
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/UnattendedTemplates/debian_preseed.cfg
r94175 r94532 40 40 d-i base-installer/kernel/override-image string linux-image-amd64 41 41 d-i pkgsel/install-language-support boolean false 42 43 @@VBOX_COND_IS_NETWORK_INACCESSIBLE@@ 44 d-i apt-setup/use_mirror boolean false 45 d-i netcfg/no_default_route true 46 d-i netcfg/get_nameservers "" 47 @@VBOX_COND_END@@ 48 42 49 @@VBOX_COND_IS_NOT_MINIMAL_INSTALLATION@@ 43 50 d-i apt-setup/restricted boolean true -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r94373 r94532 4676 4676 <interface 4677 4677 name="IUnattended" extends="$unknown" 4678 uuid="6f89464f-7 193-426c-a4df-592e4e537fa0"4678 uuid="6f89464f-7773-426c-a4df-592e4e537fa0" 4679 4679 wsmap="managed" 4680 4680 reservedMethods="4" reservedAttributes="16" … … 5014 5014 </desc> 5015 5015 </attribute> 5016 5016 5017 <attribute name="detectedImageNames" type="wstring" readonly="yes" safearray="yes"> 5017 5018 <desc> … … 5035 5036 whether unattended install is supported or not. Note that failing detecting 5036 5037 OS type from the ISO causes this attribute to be false by default. 5038 </desc> 5039 </attribute> 5040 5041 <attribute name="isNetworkAccessible" type="boolean"> 5042 <desc> 5043 Indicates whether internet is accessible. Currently setting this to 5044 false configures debian preseed files so that package mirrors are not 5045 used. 5037 5046 </desc> 5038 5047 </attribute> -
trunk/src/VBox/Main/include/UnattendedImpl.h
r94079 r94532 100 100 bool i_isFirmwareEFI() const; 101 101 Utf8Str const &i_getDetectedOSVersion(); 102 102 bool i_getIsNetworkAccessible() const; 103 103 104 104 private: … … 148 148 Utf8Str mStrDetectedOSHints; 149 149 RTCList<WIMImage> mDetectedImages; 150 bool mfIsNetworkAccessible; 150 151 /** @} */ 151 152 … … 232 233 HRESULT getDetectedImageIndices(std::vector<ULONG> &aDetectedImageIndices); 233 234 HRESULT getIsUnattendedInstallSupported(BOOL *aIsUnattendedInstallSupported); 235 HRESULT getIsNetworkAccessible(BOOL *aIsNetworkAccessible); 236 HRESULT setIsNetworkAccessible(BOOL aIsNetworkAccessible); 234 237 //internal functions 235 238 -
trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
r94297 r94532 242 242 : mhThreadReconfigureVM(NIL_RTNATIVETHREAD), mfRtcUseUtc(false), mfGuestOs64Bit(false) 243 243 , mpInstaller(NULL), mpTimeZoneInfo(NULL), mfIsDefaultAuxiliaryBasePath(true), mfDoneDetectIsoOS(false) 244 , mfIsNetworkAccessible(true) 244 245 { } 245 246 … … 3642 3643 } 3643 3644 3645 HRESULT Unattended::getIsNetworkAccessible(BOOL *aIsNetworkAccessible) 3646 { 3647 *aIsNetworkAccessible = mfIsNetworkAccessible; 3648 return S_OK; 3649 } 3650 3651 HRESULT Unattended::setIsNetworkAccessible(BOOL aIsNetworkAccessible) 3652 { 3653 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 3654 AssertReturn(mpInstaller == NULL, setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("Cannot change after prepare() has been called"))); 3655 mfIsNetworkAccessible = RT_BOOL(aIsNetworkAccessible); 3656 return S_OK; 3657 } 3658 3644 3659 /* 3645 3660 * Getters that the installer and script classes can use. … … 3816 3831 Assert(isReadLockedOnCurrentThread()); 3817 3832 return mStrDetectedOSVersion; 3833 } 3834 3835 bool Unattended::i_getIsNetworkAccessible() const 3836 { 3837 Assert(isReadLockedOnCurrentThread()); 3838 return mfIsNetworkAccessible; 3818 3839 } 3819 3840 -
trunk/src/VBox/Main/src-server/UnattendedScript.cpp
r93954 r94532 793 793 else if (IS_PLACEHOLDER_MATCH("HAS_PROXY")) 794 794 *pfOutputting = mpUnattended->i_getProxy().isNotEmpty(); 795 else if (IS_PLACEHOLDER_MATCH("IS_NETWORK_ACCESSIBLE")) 796 *pfOutputting = !mpUnattended->i_getIsNetworkAccessible(); 795 797 else 796 798 return mpSetError->setErrorBoth(E_FAIL, VERR_NOT_FOUND, tr("Unknown conditional placeholder '%.*s'"), -
trunk/src/VBox/Main/testcase/tstUnattendedScript.cpp
r94075 r94532 457 457 } 458 458 459 HRESULT Unattended::getIsNetworkAccessible(BOOL *aIsNetworkAccessible) 460 { 461 RT_NOREF(aIsNetworkAccessible); 462 return E_NOTIMPL; 463 } 464 465 HRESULT Unattended::setIsNetworkAccessible(BOOL aIsNetworkAccessible) 466 { 467 RT_NOREF(aIsNetworkAccessible); 468 return E_NOTIMPL; 469 } 470 471 459 472 /* 460 473 * Getters that the installer and script classes can use. … … 603 616 { 604 617 return mStrDetectedOSVersion; 618 } 619 620 bool Unattended::i_getIsNetworkAccessible() const 621 { 622 return mfIsNetworkAccessible; 605 623 } 606 624
Note:
See TracChangeset
for help on using the changeset viewer.