Install example psu-update@.service
The repo needs an example psu-update@.service, it was expected to be
installed by a bitbake recipe, but during the recipe review it turns
out that the repo is better to install a default one and it could be
overriden by a bbappend.
Move the psu-update@.service from vendor-example to services directory
and install it.
Tested: Verify the service is installed.
Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I105b201972b32ca3d9e14878b92c9d038a41cbdb
diff --git a/meson.build b/meson.build
index 10748e5..bec51a2 100644
--- a/meson.build
+++ b/meson.build
@@ -9,11 +9,7 @@
systemd = dependency('systemd')
servicedir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
-
-configure_file(input: 'service/xyz.openbmc_project.Software.Psu.Updater.service',
- output: 'xyz.openbmc_project.Software.Psu.Updater.service',
- copy: true,
- install_dir: servicedir)
+subdir('services')
# Common configurations for src and test
cdata = configuration_data()
diff --git a/services/meson.build b/services/meson.build
new file mode 100644
index 0000000..a35e9e9
--- /dev/null
+++ b/services/meson.build
@@ -0,0 +1,11 @@
+unit_files = [
+ 'xyz.openbmc_project.Software.Psu.Updater.service',
+ 'psu-update@.service'
+]
+
+foreach unit : unit_files
+configure_file(input: unit,
+ output: unit,
+ copy: true,
+ install_dir: servicedir)
+endforeach
diff --git a/vendor-example/psu-update@.service b/services/psu-update@.service
similarity index 65%
rename from vendor-example/psu-update@.service
rename to services/psu-update@.service
index 06635be..08e3c6e 100644
--- a/vendor-example/psu-update@.service
+++ b/services/psu-update@.service
@@ -4,7 +4,7 @@
# E.g.
# "psu-update@-xyz-openbmc_project-inventory-system-chassis-motherboard-powersupply0\x20-tmp-image-abcdefg.service"
# expands to
-# /usr/bin/psutils --update /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0 /tmp/image/abcdefg
+# /bin/echo To update /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0 /tmp/image/abcdefg
[Unit]
Description=Update PSU %I
@@ -13,5 +13,5 @@
Type=oneshot
RemainAfterExit=no
Environment="ARGS=%I"
-ExecStart=/usr/bin/psutils --update $ARGS
-SyslogIdentifier=psutils
+ExecStart=/bin/echo To update $ARGS
+ExecStart=/bin/false
diff --git a/service/xyz.openbmc_project.Software.Psu.Updater.service b/services/xyz.openbmc_project.Software.Psu.Updater.service
similarity index 100%
rename from service/xyz.openbmc_project.Software.Psu.Updater.service
rename to services/xyz.openbmc_project.Software.Psu.Updater.service