From 2e78e09b2b0888d03ea2ed5e30f56c3b66545fa8 Mon Sep 17 00:00:00 2001 From: Alexander Filippov Date: Fri, 18 Oct 2019 15:10:30 +0300 Subject: first-boot-set-*: Use ConditionPathExists Replaces the calls of `systemctl disable` with `ConditionPathExists=' in the systemd units files. It will allow us to distinguish an admin created state and a runtime created state. (From meta-openpower rev: 4b5603b4426442973f29392ee4d0955f48680fac) Change-Id: I1d187662576dea93550d21cf7031fbc663610fe7 Signed-off-by: Alexander Filippov Signed-off-by: Brad Bishop --- .../network/first-boot-set-hostname/first-boot-set-hostname.service | 1 + .../network/first-boot-set-hostname/first-boot-set-hostname.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'meta-openpower/recipes-phosphor/network/first-boot-set-hostname') diff --git a/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.service b/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.service index e58a04629..22bb80c10 100644 --- a/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.service +++ b/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.service @@ -1,5 +1,6 @@ [Unit] Description=Init BMC Hostname +ConditionPathExists=!/var/lib/first-boot-set-hostname Wants=op-vpd-parser.service After=op-vpd-parser.service diff --git a/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.sh b/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.sh index 62284d16b..eaabb0a17 100644 --- a/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.sh +++ b/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.sh @@ -81,4 +81,5 @@ sync_hostname() { sync_hostname -systemctl --no-reload disable first-boot-set-hostname.service +# Prevent start at next boot time +touch "/var/lib/first-boot-set-hostname" -- cgit v1.2.3