]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Report consistent customization error status when custom script is disabled.
authorJohn Wolfe <jwolfe@vmware.com>
Tue, 7 Jun 2022 16:52:42 +0000 (09:52 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Tue, 7 Jun 2022 16:52:42 +0000 (09:52 -0700)
open-vm-tools/libDeployPkg/linuxDeployment.c

index 8f457333bdad712cfbbf7dea29c5ad5663eedff6..2a9b319de90ce1e433657bcd2c1f4933420d3531 100644 (file)
@@ -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");