From: John Wolfe Date: Tue, 7 Jun 2022 16:52:42 +0000 (-0700) Subject: Report consistent customization error status when custom script is disabled. X-Git-Tag: stable-12.1.0~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41509dbb7223fa7e8905718c357fbd6f243f06e3;p=thirdparty%2Fopen-vm-tools.git Report consistent customization error status when custom script is disabled. --- diff --git a/open-vm-tools/libDeployPkg/linuxDeployment.c b/open-vm-tools/libDeployPkg/linuxDeployment.c index 8f457333b..2a9b319de 100644 --- a/open-vm-tools/libDeployPkg/linuxDeployment.c +++ b/open-vm-tools/libDeployPkg/linuxDeployment.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2021 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2022 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -122,6 +122,7 @@ static const int CUST_GENERIC_ERROR = 255; static const int CUST_NETWORK_ERROR = 254; static const int CUST_NIC_ERROR = 253; static const int CUST_DNS_ERROR = 252; +static const int CUST_SCRIPT_DISABLED_ERROR = 6; // the error code to use cloudinit workflow typedef enum USE_CLOUDINIT_ERROR_CODE { @@ -1442,6 +1443,11 @@ Deploy(const char* packageName) SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, GUESTCUST_EVENT_NETWORK_SETUP_FAILED, NULL); + } else if (deploymentResult == CUST_SCRIPT_DISABLED_ERROR) { + sLog(log_info, + "Setting custom script disabled error status in vmx."); + SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, + TOOLSDEPLOYPKG_ERROR_CUST_SCRIPT_DISABLED, NULL); } else { sLog(log_info, "Setting '%s' error status in vmx.", deploymentResult == CUST_GENERIC_ERROR ? "generic" : "unknown");