VirtualBox

Changeset 94533 in vbox


Ignore:
Timestamp:
Apr 8, 2022 5:09:45 PM (3 years ago)
Author:
vboxsync
Message:

Main/Unattended: ​​bugref:9781. Renaming the newly added attribute.

Location:
trunk/src/VBox/Main
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/UnattendedTemplates/debian_preseed.cfg

    r94532 r94533  
    4141d-i pkgsel/install-language-support boolean false
    4242
    43 @@VBOX_COND_IS_NETWORK_INACCESSIBLE@@
     43@@VBOX_COND_AVOID_UPDATES_OVER_NETWORK@@
    4444d-i apt-setup/use_mirror boolean false
    4545d-i netcfg/no_default_route true
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r94532 r94533  
    46764676  <interface
    46774677    name="IUnattended" extends="$unknown"
    4678     uuid="6f89464f-7773-426c-a4df-592e4e537fa0"
     4678    uuid="6f89464f-7773-436a-a4df-592e4e537fa0"
    46794679    wsmap="managed"
    46804680    reservedMethods="4" reservedAttributes="16"
     
    50395039    </attribute>
    50405040
    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.
     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).
    50465046      </desc>
    50475047    </attribute>
  • trunk/src/VBox/Main/include/UnattendedImpl.h

    r94532 r94533  
    100100    bool           i_isFirmwareEFI() const;
    101101    Utf8Str const &i_getDetectedOSVersion();
    102     bool           i_getIsNetworkAccessible() const;
     102    bool           i_getAvoidUpdatesOverNetwork() const;
    103103
    104104private:
     
    148148    Utf8Str         mStrDetectedOSHints;
    149149    RTCList<WIMImage> mDetectedImages;
    150     bool            mfIsNetworkAccessible;
     150    bool            mfAvoidUpdatesOverNetwork;
    151151    /** @} */
    152152
     
    233233    HRESULT getDetectedImageIndices(std::vector<ULONG> &aDetectedImageIndices);
    234234    HRESULT getIsUnattendedInstallSupported(BOOL *aIsUnattendedInstallSupported);
    235     HRESULT getIsNetworkAccessible(BOOL *aIsNetworkAccessible);
    236     HRESULT setIsNetworkAccessible(BOOL aIsNetworkAccessible);
     235    HRESULT getAvoidUpdatesOverNetwork(BOOL *aAvoidUpdatesOverNetwork);
     236    HRESULT setAvoidUpdatesOverNetwork(BOOL aAvoidUpdatesOverNetwork);
    237237    //internal functions
    238238
  • trunk/src/VBox/Main/src-server/UnattendedImpl.cpp

    r94532 r94533  
    242242    : mhThreadReconfigureVM(NIL_RTNATIVETHREAD), mfRtcUseUtc(false), mfGuestOs64Bit(false)
    243243    , mpInstaller(NULL), mpTimeZoneInfo(NULL), mfIsDefaultAuxiliaryBasePath(true), mfDoneDetectIsoOS(false)
    244     , mfIsNetworkAccessible(true)
     244    , mfAvoidUpdatesOverNetwork(false)
    245245{ }
    246246
     
    36433643}
    36443644
    3645 HRESULT Unattended::getIsNetworkAccessible(BOOL *aIsNetworkAccessible)
    3646 {
    3647     *aIsNetworkAccessible = mfIsNetworkAccessible;
    3648     return S_OK;
    3649 }
    3650 
    3651 HRESULT Unattended::setIsNetworkAccessible(BOOL aIsNetworkAccessible)
     3645HRESULT Unattended::getAvoidUpdatesOverNetwork(BOOL *aAvoidUpdatesOverNetwork)
     3646{
     3647    *aAvoidUpdatesOverNetwork = mfAvoidUpdatesOverNetwork;
     3648    return S_OK;
     3649}
     3650
     3651HRESULT Unattended::setAvoidUpdatesOverNetwork(BOOL aAvoidUpdatesOverNetwork)
    36523652{
    36533653    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    36543654    AssertReturn(mpInstaller == NULL, setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("Cannot change after prepare() has been called")));
    3655     mfIsNetworkAccessible = RT_BOOL(aIsNetworkAccessible);
     3655    mfAvoidUpdatesOverNetwork = RT_BOOL(aAvoidUpdatesOverNetwork);
    36563656    return S_OK;
    36573657}
     
    38333833}
    38343834
    3835 bool Unattended::i_getIsNetworkAccessible() const
     3835bool Unattended::i_getAvoidUpdatesOverNetwork() const
    38363836{
    38373837    Assert(isReadLockedOnCurrentThread());
    3838     return mfIsNetworkAccessible;
     3838    return mfAvoidUpdatesOverNetwork;
    38393839}
    38403840
  • trunk/src/VBox/Main/src-server/UnattendedScript.cpp

    r94532 r94533  
    793793    else if (IS_PLACEHOLDER_MATCH("HAS_PROXY"))
    794794        *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();
    797797    else
    798798        return mpSetError->setErrorBoth(E_FAIL, VERR_NOT_FOUND, tr("Unknown conditional placeholder '%.*s'"),
  • trunk/src/VBox/Main/testcase/tstUnattendedScript.cpp

    r94532 r94533  
    457457}
    458458
    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);
     459HRESULT Unattended::getAvoidUpdatesOverNetwork(BOOL *aAvoidUpdatesOverNetwork)
     460{
     461    RT_NOREF(aAvoidUpdatesOverNetwork);
     462    return E_NOTIMPL;
     463}
     464
     465HRESULT Unattended::setAvoidUpdatesOverNetwork(BOOL aAvoidUpdatesOverNetwork)
     466{
     467    RT_NOREF(aAvoidUpdatesOverNetwork);
    468468    return E_NOTIMPL;
    469469}
     
    618618}
    619619
    620 bool Unattended::i_getIsNetworkAccessible() const
    621 {
    622     return mfIsNetworkAccessible;
     620bool Unattended::i_getAvoidUpdatesOverNetwork() const
     621{
     622    return mfAvoidUpdatesOverNetwork;
    623623}
    624624
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette