From 502c4e00e0c8906115349b51b62574489dcca764 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 1 Aug 2017 08:22:20 -0600 Subject: [PATCH] Set remove-machine-id to executable We had previously added an element to remove the machine id from the images however the script is not executable so it wasn't actually being run as part of the image building process. This change sets 70-remove-machine-id to be executable so that /etc/machine-id will actually be removed from the images during the building process. Additionally this changes the element to clear the file rather than delete it as if the file is missing, things may not work as expected. Change-Id: Id3f8c510801f8fcc1fc03415b0ebd23a2ff9da4c Closes-Bug: #1672361 (cherry picked from commit ab7ac88006c6c26bbebbe6862792f89d34a65236) --- .../remove-machine-id/post-install.d/70-remove-machine-id | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/elements/remove-machine-id/post-install.d/70-remove-machine-id b/elements/remove-machine-id/post-install.d/70-remove-machine-id index 463da18b..ac2fc4d3 100755 --- a/elements/remove-machine-id/post-install.d/70-remove-machine-id +++ b/elements/remove-machine-id/post-install.d/70-remove-machine-id @@ -4,5 +4,7 @@ set -eu set -o pipefail # In order to make sure not all nodes have the same machine id, we need to -# remove it from the image and it should be generated on boot. LP#1672461 -rm -f /etc/machine-id +# clear it from the image and it should be generated on boot. LP#1672461 +# It should be noted that if this file doesn't exist, odd interactions may +# occur. +:> /etc/machine-id