From bb09fabff15a314bc5e0345d3274686f333aab26 Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Thu, 2 Sep 2021 18:14:48 +0900 Subject: [PATCH] dbus: add vip configuration Change-Id: I02c9d76cce2f1587add8ad6a48551cf67b3dbe73 Signed-off-by: Youngjae Cho --- packaging/dbus.spec | 5 +++++ packaging/dbus.vip.conf | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 packaging/dbus.vip.conf diff --git a/packaging/dbus.spec b/packaging/dbus.spec index a1ccefa..cf34ac8 100644 --- a/packaging/dbus.spec +++ b/packaging/dbus.spec @@ -33,6 +33,7 @@ Source3: dbus_at_console.ck Source4: baselibs.conf Source7: dbus.sh Source1001: dbus.manifest +Source1002: dbus.vip.conf # COMMON1-END Requires: security-config Requires(pre): /usr/bin/getent @@ -246,6 +247,9 @@ rm -rf %{buildroot}/%{_bindir}/dbus-launch install -d %{buildroot}%{_sysconfdir}/profile.d install -m 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/profile.d/dbus.sh +mkdir -p %{buildroot}/%{_sysconfdir}/resourced/vip-process.d +cp %{SOURCE1002} %{buildroot}/%{_sysconfdir}/resourced/vip-process.d/dbus.conf + # docs rm -rf %{buildroot}%{_datadir}/doc @@ -350,6 +354,7 @@ popd %{_sysconfdir}/profile.d/dbus.sh %{_prefix}/lib/sysusers.d/dbus.conf %{_prefix}/lib/tmpfiles.d/dbus.conf +%{_sysconfdir}/resourced/vip-process.d/dbus.conf %files libs %manifest %{name}.manifest diff --git a/packaging/dbus.vip.conf b/packaging/dbus.vip.conf new file mode 100644 index 0000000..94305a7 --- /dev/null +++ b/packaging/dbus.vip.conf @@ -0,0 +1,26 @@ +# Define VIP processes or services +# Install this file at /etc/resourced/vip-process.d +# resourced will register and monitor designated process or service +# +# [VIP_GROUP1] // Section VIP_GROUP# +# // There can be multiple vip groups. +# // If there is only one group, then +# // just [VIP_GROUP] is also possible. +# +# PROCESS=some_binray1 // Property PROCESS +# PROCESS=some_binary2 // Define vip processes +# ... +# +# SERVICE=some_unit1.service // Property SERVICE +# SERVICE=some_unit2.service // Define vip service units +# ... +# +# ACTION_ON_FAILURE=reboot // Property ACTION_ON_FAILURE +# ... // Define actions for this [VIP_GROUP1] +# // Currently only "reboot" is supported. +# [VIP_GROUP2] +# ... + +[VIP_GROUP] +SERVICE=dbus.service +ACTION_ON_FAILURE=reboot -- 2.7.4