From 4cccf6ba071fe239f88bf0b03dcc319c20567867 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 8 Dec 2025 19:45:43 +0100 Subject: [PATCH] Resolves: RHEL-102468, Add systemd service support for vpdupdate --- lsvpd.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lsvpd.spec b/lsvpd.spec index f44057d..86863dd 100644 --- a/lsvpd.spec +++ b/lsvpd.spec @@ -19,6 +19,8 @@ BuildRequires: automake BuildRequires: libtool BuildRequires: librtas-devel BuildRequires: make +BuildRequires: systemd-rpm-macros +Requires: systemd Requires(post): %{_sbindir}/vpdupdate @@ -48,10 +50,20 @@ on POWER PC based systems. %make_install %post +# Post-install script for vpdupdate +# Always enable the service +systemctl -q enable vpdupdate.service >/dev/null 2>&1 || : +systemctl daemon-reload >/dev/null 2>&1 || : + %{_sbindir}/vpdupdate & # Ignore the vpdupdate failures and enforce a success exit 0 +%preun +# Pre-uninstall script for vpdupdate +systemctl -q disable vpdupdate.service >/dev/null 2>&1 || : +systemctl daemon-reload >/dev/null 2>&1 || : + %files %{!?_licensedir:%global license %%doc} %license COPYING @@ -70,6 +82,7 @@ exit 0 %config %{_sysconfdir}/lsvpd/cpu_mod_conv.conf %config %{_sysconfdir}/lsvpd/nvme_templates.conf %dir %{_sysconfdir}/lsvpd +%{_unitdir}/vpdupdate.service %changelog * Mon Dec 08 2025 Than Ngo - 1.7.17-1