Changeset 94533 in vbox
- Timestamp:
- Apr 8, 2022 5:09:45 PM (3 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/UnattendedTemplates/debian_preseed.cfg
r94532 r94533 41 41 d-i pkgsel/install-language-support boolean false 42 42 43 @@VBOX_COND_ IS_NETWORK_INACCESSIBLE@@43 @@VBOX_COND_AVOID_UPDATES_OVER_NETWORK@@ 44 44 d-i apt-setup/use_mirror boolean false 45 45 d-i netcfg/no_default_route true -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r94532 r94533 4676 4676 <interface 4677 4677 name="IUnattended" extends="$unknown" 4678 uuid="6f89464f-7773-4 26c-a4df-592e4e537fa0"4678 uuid="6f89464f-7773-436a-a4df-592e4e537fa0" 4679 4679 wsmap="managed" 4680 4680 reservedMethods="4" reservedAttributes="16" … … 5039 5039 </attribute> 5040 5040 5041 <attribute name=" isNetworkAccessible" type="boolean">5042 <desc> 5043 Indicates whether internet is accessible. Currently setting this to5044 false configures debian preseed files so that package mirrors are not5045 used.5041 <attribute name="avoidUpdatesOverNetwork" type="boolean"> 5042 <desc> 5043 When set to true installation is configured to abstain from 5044 using network to update/get data. Especially useful when network 5045 is not available (as in our test boxes). 5046 5046 </desc> 5047 5047 </attribute> -
trunk/src/VBox/Main/include/UnattendedImpl.h
r94532 r94533 100 100 bool i_isFirmwareEFI() const; 101 101 Utf8Str const &i_getDetectedOSVersion(); 102 bool i_get IsNetworkAccessible() const;102 bool i_getAvoidUpdatesOverNetwork() const; 103 103 104 104 private: … … 148 148 Utf8Str mStrDetectedOSHints; 149 149 RTCList<WIMImage> mDetectedImages; 150 bool mf IsNetworkAccessible;150 bool mfAvoidUpdatesOverNetwork; 151 151 /** @} */ 152 152 … … 233 233 HRESULT getDetectedImageIndices(std::vector<ULONG> &aDetectedImageIndices); 234 234 HRESULT getIsUnattendedInstallSupported(BOOL *aIsUnattendedInstallSupported); 235 HRESULT get IsNetworkAccessible(BOOL *aIsNetworkAccessible);236 HRESULT set IsNetworkAccessible(BOOL aIsNetworkAccessible);235 HRESULT getAvoidUpdatesOverNetwork(BOOL *aAvoidUpdatesOverNetwork); 236 HRESULT setAvoidUpdatesOverNetwork(BOOL aAvoidUpdatesOverNetwork); 237 237 //internal functions 238 238 -
trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
r94532 r94533 242 242 : mhThreadReconfigureVM(NIL_RTNATIVETHREAD), mfRtcUseUtc(false), mfGuestOs64Bit(false) 243 243 , mpInstaller(NULL), mpTimeZoneInfo(NULL), mfIsDefaultAuxiliaryBasePath(true), mfDoneDetectIsoOS(false) 244 , mf IsNetworkAccessible(true)244 , mfAvoidUpdatesOverNetwork(false) 245 245 { } 246 246 … … 3643 3643 } 3644 3644 3645 HRESULT Unattended::get IsNetworkAccessible(BOOL *aIsNetworkAccessible)3646 { 3647 *a IsNetworkAccessible = mfIsNetworkAccessible;3648 return S_OK; 3649 } 3650 3651 HRESULT Unattended::set IsNetworkAccessible(BOOL aIsNetworkAccessible)3645 HRESULT Unattended::getAvoidUpdatesOverNetwork(BOOL *aAvoidUpdatesOverNetwork) 3646 { 3647 *aAvoidUpdatesOverNetwork = mfAvoidUpdatesOverNetwork; 3648 return S_OK; 3649 } 3650 3651 HRESULT Unattended::setAvoidUpdatesOverNetwork(BOOL aAvoidUpdatesOverNetwork) 3652 3652 { 3653 3653 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 3654 3654 AssertReturn(mpInstaller == NULL, setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("Cannot change after prepare() has been called"))); 3655 mf IsNetworkAccessible = RT_BOOL(aIsNetworkAccessible);3655 mfAvoidUpdatesOverNetwork = RT_BOOL(aAvoidUpdatesOverNetwork); 3656 3656 return S_OK; 3657 3657 } … … 3833 3833 } 3834 3834 3835 bool Unattended::i_get IsNetworkAccessible() const3835 bool Unattended::i_getAvoidUpdatesOverNetwork() const 3836 3836 { 3837 3837 Assert(isReadLockedOnCurrentThread()); 3838 return mf IsNetworkAccessible;3838 return mfAvoidUpdatesOverNetwork; 3839 3839 } 3840 3840 -
trunk/src/VBox/Main/src-server/UnattendedScript.cpp
r94532 r94533 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 else if (IS_PLACEHOLDER_MATCH("AVOID_UPDATES_OVER_NETWORK")) 796 *pfOutputting = mpUnattended->i_getAvoidUpdatesOverNetwork(); 797 797 else 798 798 return mpSetError->setErrorBoth(E_FAIL, VERR_NOT_FOUND, tr("Unknown conditional placeholder '%.*s'"), -
trunk/src/VBox/Main/testcase/tstUnattendedScript.cpp
r94532 r94533 457 457 } 458 458 459 HRESULT Unattended::get IsNetworkAccessible(BOOL *aIsNetworkAccessible)460 { 461 RT_NOREF(a IsNetworkAccessible);462 return E_NOTIMPL; 463 } 464 465 HRESULT Unattended::set IsNetworkAccessible(BOOL aIsNetworkAccessible)466 { 467 RT_NOREF(a IsNetworkAccessible);459 HRESULT Unattended::getAvoidUpdatesOverNetwork(BOOL *aAvoidUpdatesOverNetwork) 460 { 461 RT_NOREF(aAvoidUpdatesOverNetwork); 462 return E_NOTIMPL; 463 } 464 465 HRESULT Unattended::setAvoidUpdatesOverNetwork(BOOL aAvoidUpdatesOverNetwork) 466 { 467 RT_NOREF(aAvoidUpdatesOverNetwork); 468 468 return E_NOTIMPL; 469 469 } … … 618 618 } 619 619 620 bool Unattended::i_get IsNetworkAccessible() const621 { 622 return mf IsNetworkAccessible;620 bool Unattended::i_getAvoidUpdatesOverNetwork() const 621 { 622 return mfAvoidUpdatesOverNetwork; 623 623 } 624 624
Note:
See TracChangeset
for help on using the changeset viewer.