commit | 4b5603b4426442973f29392ee4d0955f48680fac | [log] [tgz] |
---|---|---|
author | Alexander Filippov <a.filippov@yadro.com> | Fri Oct 18 15:10:30 2019 +0300 |
committer | Alexander Filippov <a.filippov@yadro.com> | Fri Oct 18 15:10:30 2019 +0300 |
tree | 6b586341ee3efb521d9ae12d08757f73c77d0739 | |
parent | b1c73efdc2d7e1ea7b506e1ddb30493aa818bc1d [diff] |
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. Change-Id: Icde57c942166c40274eddc738ed1ed704eea80a4 Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
diff --git a/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.service b/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.service index e58a046..22bb80c 100644 --- a/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.service +++ b/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/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.sh b/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.sh index 62284d1..eaabb0a 100644 --- a/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.sh +++ b/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.sh
@@ -81,4 +81,5 @@ sync_hostname -systemctl --no-reload disable first-boot-set-hostname.service +# Prevent start at next boot time +touch "/var/lib/first-boot-set-hostname"
diff --git a/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh b/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh index da1b305..63a4ad7 100755 --- a/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh +++ b/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh
@@ -79,4 +79,6 @@ sync_mac $1 -systemctl --no-reload disable first-boot-set-mac@${1}.service +# Prevent start at next boot time +mkdir -p "/var/lib/first-boot-set-mac" +touch "/var/lib/first-boot-set-mac/${1}"
diff --git a/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac@.service b/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac@.service index 8986efd..3ff5fc1 100644 --- a/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac@.service +++ b/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac@.service
@@ -1,5 +1,6 @@ [Unit] Description=Init BMC MAC address for NIC %I +ConditionPathExists=!/var/lib/first-boot-set-mac/%i Wants=mapper-wait@-xyz-openbmc_project-inventory.service After=mapper-wait@-xyz-openbmc_project-inventory.service Wants=mapper-wait@-xyz-openbmc_project-network-%i.service