2a5b6a
From 4a2c311bfe21eda9472f52795db1c9f883e6c194 Mon Sep 17 00:00:00 2001
2a5b6a
From: Florian Festi <ffesti@redhat.com>
2a5b6a
Date: Mon, 4 Jul 2016 17:45:33 +0200
2a5b6a
Subject: [PATCH] Add man page for systemd-inhibit plugin
2a5b6a
2a5b6a
---
2a5b6a
 doc/Makefile.am                  |  1 +
2a5b6a
 doc/rpm-plugin-systemd-inhibit.8 | 36 ++++++++++++++++++++++++++++++++++++
2a5b6a
 2 files changed, 37 insertions(+)
2a5b6a
 create mode 100644 doc/rpm-plugin-systemd-inhibit.8
2a5b6a
2a5b6a
diff --git a/doc/Makefile.am b/doc/Makefile.am
2a5b6a
index f7940b9..d2f520d 100644
2a5b6a
--- a/doc/Makefile.am
2a5b6a
+++ b/doc/Makefile.am
2a5b6a
@@ -9,6 +9,7 @@ EXTRA_DIST += $(man_man1_DATA)
2a5b6a
 man_man8dir = $(mandir)/man8
2a5b6a
 man_man8_DATA = rpm.8 rpmbuild.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8
2a5b6a
 man_man8_DATA += rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8
2a5b6a
+man_man8_DATA += rpm-plugin-systemd-inhibit.8
2a5b6a
 EXTRA_DIST += $(man_man8_DATA)
2a5b6a
 
2a5b6a
 man_fr_man8dir = $(mandir)/fr/man8
2a5b6a
diff --git a/doc/rpm-plugin-systemd-inhibit.8 b/doc/rpm-plugin-systemd-inhibit.8
2a5b6a
new file mode 100644
2a5b6a
index 0000000..b49e8ef
2a5b6a
--- /dev/null
2a5b6a
+++ b/doc/rpm-plugin-systemd-inhibit.8
2a5b6a
@@ -0,0 +1,36 @@
2a5b6a
+.TH "RPM-SYSTEMD-INHIBIT" "8" "14 Apr 2016" "Red Hat, Inc."
2a5b6a
+.SH NAME
2a5b6a
+rpm-plugin-systemd-inhibit \- Plugin for the RPM Package Manager
2a5b6a
+
2a5b6a
+.SH Description
2a5b6a
+
2a5b6a
+This plugin for RPM prevents the system to enter shutdown, sleep or idle
2a5b6a
+mode while there is a rpm transaction running to prevent system corruption
2a5b6a
+that can occur if the transaction is interrupted by a reboot.
2a5b6a
+
2a5b6a
+This is achieved by using the inhibit DBUS interface of systemd. The call is
2a5b6a
+roughly equivalent to executing
2a5b6a
+
2a5b6a
+\fBsystemd-inhibit --mode=block --what=idle:sleep:shutdown --who=RPM --why="Transaction running"\fR 
2a5b6a
+
2a5b6a
+See \fBsystemd-inhibit(1)\fR for the details of this mechanism. 
2a5b6a
+
2a5b6a
+It is strongly advised to have the plugin installed on all systemd
2a5b6a
+based systems.
2a5b6a
+
2a5b6a
+.SH Prerequisites
2a5b6a
+
2a5b6a
+For the plugin to work systemd has to be used as init system and
2a5b6a
+though the DBUS system bus must be available. If the plugin cannot access the
2a5b6a
+interface it gives a warning but does not stop the transaction.
2a5b6a
+
2a5b6a
+.SH Configuration
2a5b6a
+
2a5b6a
+The plugin currently does not have any configuration option other than
2a5b6a
+turning it on and off. It can be disabled by commenting out the
2a5b6a
+\fI%__transaction_systemd_inhibit\fR macro in main macros file
2a5b6a
+(typically located at \fI/usr/lib/rpm/macros\fR) or otherwise change
2a5b6a
+the value of the macro.
2a5b6a
+
2a5b6a
+Another option is to remove the plugin from the system if it is
2a5b6a
+packaged in its own sub package.
2a5b6a
-- 
2a5b6a
2.5.5
2a5b6a