424 lines
13 KiB
Diff
424 lines
13 KiB
Diff
|
From 13f77e9fd53682202bbd32faf8f9e55e0b99fec2 Mon Sep 17 00:00:00 2001
|
||
|
From: Harald Hoyer <harald@redhat.com>
|
||
|
Date: Mon, 23 Jul 2012 11:10:13 +0200
|
||
|
Subject: [PATCH] add documentation for systemd services in the initramfs
|
||
|
|
||
|
---
|
||
|
Makefile | 52 +++++++++++++---------
|
||
|
dracut.spec | 1 +
|
||
|
modules.d/98systemd/dracut-cmdline.service | 1 +
|
||
|
modules.d/98systemd/dracut-cmdline.service.8.asc | 26 +++++++++++
|
||
|
modules.d/98systemd/dracut-initqueue.service | 1 +
|
||
|
modules.d/98systemd/dracut-initqueue.service.8.asc | 25 +++++++++++
|
||
|
modules.d/98systemd/dracut-pre-pivot.service | 1 +
|
||
|
modules.d/98systemd/dracut-pre-pivot.service.8.asc | 25 +++++++++++
|
||
|
modules.d/98systemd/dracut-pre-trigger.service | 1 +
|
||
|
.../98systemd/dracut-pre-trigger.service.8.asc | 25 +++++++++++
|
||
|
modules.d/98systemd/dracut-pre-udev.service | 1 +
|
||
|
modules.d/98systemd/dracut-pre-udev.service.8.asc | 25 +++++++++++
|
||
|
modules.d/98systemd/initrd-switch-root.service | 1 +
|
||
|
.../98systemd/initrd-switch-root.service.8.asc | 25 +++++++++++
|
||
|
modules.d/98systemd/udevadm-cleanup-db.service | 1 +
|
||
|
.../98systemd/udevadm-cleanup-db.service.8.asc | 25 +++++++++++
|
||
|
16 files changed, 215 insertions(+), 21 deletions(-)
|
||
|
create mode 100644 modules.d/98systemd/dracut-cmdline.service.8.asc
|
||
|
create mode 100644 modules.d/98systemd/dracut-initqueue.service.8.asc
|
||
|
create mode 100644 modules.d/98systemd/dracut-pre-pivot.service.8.asc
|
||
|
create mode 100644 modules.d/98systemd/dracut-pre-trigger.service.8.asc
|
||
|
create mode 100644 modules.d/98systemd/dracut-pre-udev.service.8.asc
|
||
|
create mode 100644 modules.d/98systemd/initrd-switch-root.service.8.asc
|
||
|
create mode 100644 modules.d/98systemd/udevadm-cleanup-db.service.8.asc
|
||
|
|
||
|
diff --git a/Makefile b/Makefile
|
||
|
index 0b29161..548952d 100644
|
||
|
--- a/Makefile
|
||
|
+++ b/Makefile
|
||
|
@@ -9,28 +9,41 @@ sysconfdir ?= ${prefix}/etc
|
||
|
bindir ?= ${prefix}/bin
|
||
|
mandir ?= ${prefix}/share/man
|
||
|
|
||
|
-manpages = dracut.8 \
|
||
|
- dracut.cmdline.7 \
|
||
|
- dracut.conf.5 \
|
||
|
- dracut-catimages.8 \
|
||
|
- lsinitrd.1 \
|
||
|
- mkinitrd.8
|
||
|
+man1pages = lsinitrd.1
|
||
|
+
|
||
|
+man5pages = dracut.conf.5
|
||
|
+
|
||
|
+man7pages = dracut.cmdline.7
|
||
|
+
|
||
|
+man8pages = dracut.8 \
|
||
|
+ dracut-catimages.8 \
|
||
|
+ mkinitrd.8 \
|
||
|
+ modules.d/98systemd/dracut-cmdline.service.8 \
|
||
|
+ modules.d/98systemd/dracut-initqueue.service.8 \
|
||
|
+ modules.d/98systemd/dracut-pre-pivot.service.8 \
|
||
|
+ modules.d/98systemd/dracut-pre-trigger.service.8 \
|
||
|
+ modules.d/98systemd/dracut-pre-udev.service.8 \
|
||
|
+ modules.d/98systemd/initrd-switch-root.service.8 \
|
||
|
+ modules.d/98systemd/udevadm-cleanup-db.service.8
|
||
|
+
|
||
|
+manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)
|
||
|
+
|
||
|
|
||
|
.PHONY: install clean archive rpm testimage test all check AUTHORS doc
|
||
|
|
||
|
all: syncheck dracut-version.sh dracut-install
|
||
|
|
||
|
DRACUT_INSTALL_SOURCE = \
|
||
|
- install/dracut-install.c \
|
||
|
- install/hashmap.c\
|
||
|
- install/log.c \
|
||
|
- install/util.c
|
||
|
+ install/dracut-install.c \
|
||
|
+ install/hashmap.c\
|
||
|
+ install/log.c \
|
||
|
+ install/util.c
|
||
|
|
||
|
DRACUT_INSTALL_HEADER = \
|
||
|
- install/hashmap.h \
|
||
|
- install/log.h \
|
||
|
- install/macro.h \
|
||
|
- install/util.h
|
||
|
+ install/hashmap.h \
|
||
|
+ install/log.h \
|
||
|
+ install/macro.h \
|
||
|
+ install/util.h
|
||
|
|
||
|
dracut-install: $(DRACUT_INSTALL_SOURCE) $(DRACUT_INSTALL_HEADER)
|
||
|
gcc -std=gnu99 -O2 -g -Wall -o dracut-install $(DRACUT_INSTALL_SOURCE)
|
||
|
@@ -73,13 +86,10 @@ install: doc dracut-version.sh
|
||
|
install -m 0755 dracut-logger.sh $(DESTDIR)$(pkglibdir)/dracut-logger.sh
|
||
|
install -m 0755 dracut-initramfs-restore.sh $(DESTDIR)$(pkglibdir)/dracut-initramfs-restore
|
||
|
cp -arx modules.d $(DESTDIR)$(pkglibdir)
|
||
|
- install -m 0644 lsinitrd.1 $(DESTDIR)$(mandir)/man1/lsinitrd.1
|
||
|
- install -m 0644 mkinitrd.8 $(DESTDIR)$(mandir)/man8/mkinitrd.8
|
||
|
- install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8/dracut.8
|
||
|
- install -m 0644 dracut-catimages.8 \
|
||
|
- $(DESTDIR)$(mandir)/man8/dracut-catimages.8
|
||
|
- install -m 0644 dracut.conf.5 $(DESTDIR)$(mandir)/man5/dracut.conf.5
|
||
|
- install -m 0644 dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.cmdline.7
|
||
|
+ for i in $(man1pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man1/$${i##*/}; done
|
||
|
+ for i in $(man5pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man5/$${i##*/}; done
|
||
|
+ for i in $(man7pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man7/$${i##*/}; done
|
||
|
+ for i in $(man8pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man8/$${i##*/}; done
|
||
|
ln -s dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7
|
||
|
if [ -n "$(systemdsystemunitdir)" ]; then \
|
||
|
mkdir -p $(DESTDIR)$(systemdsystemunitdir); \
|
||
|
diff --git a/dracut.spec b/dracut.spec
|
||
|
index 25e48a2..9a93e57 100644
|
||
|
--- a/dracut.spec
|
||
|
+++ b/dracut.spec
|
||
|
@@ -258,6 +258,7 @@ rm -rf $RPM_BUILD_ROOT
|
||
|
%endif
|
||
|
%dir /etc/dracut.conf.d
|
||
|
%{_mandir}/man8/dracut.8*
|
||
|
+%{_mandir}/man8/*service.8*
|
||
|
%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
|
||
|
%{_mandir}/man8/mkinitrd.8*
|
||
|
%{_mandir}/man1/lsinitrd.1*
|
||
|
diff --git a/modules.d/98systemd/dracut-cmdline.service b/modules.d/98systemd/dracut-cmdline.service
|
||
|
index 1ed50a9..5073dbd 100644
|
||
|
--- a/modules.d/98systemd/dracut-cmdline.service
|
||
|
+++ b/modules.d/98systemd/dracut-cmdline.service
|
||
|
@@ -9,6 +9,7 @@
|
||
|
|
||
|
[Unit]
|
||
|
Description=Dracut cmdline hook
|
||
|
+Documentation=man:dracut-cmdline.service(8)
|
||
|
DefaultDependencies=no
|
||
|
Before=dracut-pre-udev.service
|
||
|
After=systemd-journald.socket
|
||
|
diff --git a/modules.d/98systemd/dracut-cmdline.service.8.asc b/modules.d/98systemd/dracut-cmdline.service.8.asc
|
||
|
new file mode 100644
|
||
|
index 0000000..eaed6aa
|
||
|
--- /dev/null
|
||
|
+++ b/modules.d/98systemd/dracut-cmdline.service.8.asc
|
||
|
@@ -0,0 +1,26 @@
|
||
|
+DRACUT-CMDLINE.SERVICE(8)
|
||
|
+=========================
|
||
|
+:doctype: manpage
|
||
|
+:man source: dracut
|
||
|
+:man manual: dracut
|
||
|
+
|
||
|
+NAME
|
||
|
+----
|
||
|
+dracut-cmdline.service - runs the dracut hooks to parse the kernel command line
|
||
|
+
|
||
|
+SYNOPSIS
|
||
|
+--------
|
||
|
+dracut-cmdline.service
|
||
|
+
|
||
|
+DESCRIPTION
|
||
|
+-----------
|
||
|
+This service runs all the dracut hooks to parse the kernel command line in
|
||
|
+the initramfs.
|
||
|
+
|
||
|
+AUTHORS
|
||
|
+-------
|
||
|
+Harald Hoyer
|
||
|
+
|
||
|
+SEE ALSO
|
||
|
+--------
|
||
|
+*dracut*(8)
|
||
|
diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service
|
||
|
index e611e93..f43aa21 100644
|
||
|
--- a/modules.d/98systemd/dracut-initqueue.service
|
||
|
+++ b/modules.d/98systemd/dracut-initqueue.service
|
||
|
@@ -9,6 +9,7 @@
|
||
|
|
||
|
[Unit]
|
||
|
Description=Dracut initqueue hook
|
||
|
+Documentation=man:dracut-initqueue.service(8)
|
||
|
DefaultDependencies=no
|
||
|
After=systemd-udev-trigger.service
|
||
|
Wants=systemd-udev-trigger.service
|
||
|
diff --git a/modules.d/98systemd/dracut-initqueue.service.8.asc b/modules.d/98systemd/dracut-initqueue.service.8.asc
|
||
|
new file mode 100644
|
||
|
index 0000000..d405d04
|
||
|
--- /dev/null
|
||
|
+++ b/modules.d/98systemd/dracut-initqueue.service.8.asc
|
||
|
@@ -0,0 +1,25 @@
|
||
|
+DRACUT-INITQUEUE.SERVICE(8)
|
||
|
+===========================
|
||
|
+:doctype: manpage
|
||
|
+:man source: dracut
|
||
|
+:man manual: dracut
|
||
|
+
|
||
|
+NAME
|
||
|
+----
|
||
|
+dracut-initqueue.service - runs the dracut main loop to find the real root
|
||
|
+
|
||
|
+SYNOPSIS
|
||
|
+--------
|
||
|
+dracut-initqueue.service
|
||
|
+
|
||
|
+DESCRIPTION
|
||
|
+-----------
|
||
|
+This service runs all the main loop of dracut in the initramfs to find the real root.
|
||
|
+
|
||
|
+AUTHORS
|
||
|
+-------
|
||
|
+Harald Hoyer
|
||
|
+
|
||
|
+SEE ALSO
|
||
|
+--------
|
||
|
+*dracut*(8)
|
||
|
diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service
|
||
|
index 317b476..25ef697 100644
|
||
|
--- a/modules.d/98systemd/dracut-pre-pivot.service
|
||
|
+++ b/modules.d/98systemd/dracut-pre-pivot.service
|
||
|
@@ -9,6 +9,7 @@
|
||
|
|
||
|
[Unit]
|
||
|
Description=Dracut pre-pivot and cleanup hook
|
||
|
+Documentation=man:dracut-pre-pivot.service(8)
|
||
|
DefaultDependencies=no
|
||
|
After=dracut-initqueue.service
|
||
|
ConditionPathExists=/etc/initrd-release
|
||
|
diff --git a/modules.d/98systemd/dracut-pre-pivot.service.8.asc b/modules.d/98systemd/dracut-pre-pivot.service.8.asc
|
||
|
new file mode 100644
|
||
|
index 0000000..2e19a6e
|
||
|
--- /dev/null
|
||
|
+++ b/modules.d/98systemd/dracut-pre-pivot.service.8.asc
|
||
|
@@ -0,0 +1,25 @@
|
||
|
+DRACUT-PRE-PIVOT.SERVICE(8)
|
||
|
+===========================
|
||
|
+:doctype: manpage
|
||
|
+:man source: dracut
|
||
|
+:man manual: dracut
|
||
|
+
|
||
|
+NAME
|
||
|
+----
|
||
|
+dracut-pre-pivot.service - runs the dracut hooks before switching root
|
||
|
+
|
||
|
+SYNOPSIS
|
||
|
+--------
|
||
|
+dracut-pre-pivot.service
|
||
|
+
|
||
|
+DESCRIPTION
|
||
|
+-----------
|
||
|
+This service runs all dracut hooks before the system switched to the real root.
|
||
|
+
|
||
|
+AUTHORS
|
||
|
+-------
|
||
|
+Harald Hoyer
|
||
|
+
|
||
|
+SEE ALSO
|
||
|
+--------
|
||
|
+*dracut*(8)
|
||
|
diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service
|
||
|
index b2dcf68..468249b 100644
|
||
|
--- a/modules.d/98systemd/dracut-pre-trigger.service
|
||
|
+++ b/modules.d/98systemd/dracut-pre-trigger.service
|
||
|
@@ -9,6 +9,7 @@
|
||
|
|
||
|
[Unit]
|
||
|
Description=Dracut pre-trigger hook
|
||
|
+Documentation=man:dracut-pre-trigger.service(8)
|
||
|
DefaultDependencies=no
|
||
|
Before=systemd-udev-trigger.service dracut-initqueue.service
|
||
|
After=dracut-pre-udev.service systemd-udevd.service
|
||
|
diff --git a/modules.d/98systemd/dracut-pre-trigger.service.8.asc b/modules.d/98systemd/dracut-pre-trigger.service.8.asc
|
||
|
new file mode 100644
|
||
|
index 0000000..7a856a9
|
||
|
--- /dev/null
|
||
|
+++ b/modules.d/98systemd/dracut-pre-trigger.service.8.asc
|
||
|
@@ -0,0 +1,25 @@
|
||
|
+DRACUT-PRE-TRIGGER.SERVICE(8)
|
||
|
+=============================
|
||
|
+:doctype: manpage
|
||
|
+:man source: dracut
|
||
|
+:man manual: dracut
|
||
|
+
|
||
|
+NAME
|
||
|
+----
|
||
|
+dracut-pre-trigger.service - runs the dracut hooks before udevd is triggered
|
||
|
+
|
||
|
+SYNOPSIS
|
||
|
+--------
|
||
|
+dracut-pre-trigger.service
|
||
|
+
|
||
|
+DESCRIPTION
|
||
|
+-----------
|
||
|
+This service runs all dracut hooks before udevd is triggered in the initramfs.
|
||
|
+
|
||
|
+AUTHORS
|
||
|
+-------
|
||
|
+Harald Hoyer
|
||
|
+
|
||
|
+SEE ALSO
|
||
|
+--------
|
||
|
+*dracut*(8)
|
||
|
diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service
|
||
|
index cc14f88..bedcf84 100644
|
||
|
--- a/modules.d/98systemd/dracut-pre-udev.service
|
||
|
+++ b/modules.d/98systemd/dracut-pre-udev.service
|
||
|
@@ -9,6 +9,7 @@
|
||
|
|
||
|
[Unit]
|
||
|
Description=Dracut pre-udev hook
|
||
|
+Documentation=man:dracut-pre-udev.service(8)
|
||
|
DefaultDependencies=no
|
||
|
Before=systemd-udevd.service dracut-pre-trigger.service
|
||
|
After=dracut-cmdline.service
|
||
|
diff --git a/modules.d/98systemd/dracut-pre-udev.service.8.asc b/modules.d/98systemd/dracut-pre-udev.service.8.asc
|
||
|
new file mode 100644
|
||
|
index 0000000..2126d46
|
||
|
--- /dev/null
|
||
|
+++ b/modules.d/98systemd/dracut-pre-udev.service.8.asc
|
||
|
@@ -0,0 +1,25 @@
|
||
|
+DRACUT-PRE-UDEV.SERVICE(8)
|
||
|
+==========================
|
||
|
+:doctype: manpage
|
||
|
+:man source: dracut
|
||
|
+:man manual: dracut
|
||
|
+
|
||
|
+NAME
|
||
|
+----
|
||
|
+dracut-pre-udev.service - runs the dracut hooks before udevd is started
|
||
|
+
|
||
|
+SYNOPSIS
|
||
|
+--------
|
||
|
+dracut-pre-udev.service
|
||
|
+
|
||
|
+DESCRIPTION
|
||
|
+-----------
|
||
|
+This service runs all dracut hooks before udevd is started in the initramfs.
|
||
|
+
|
||
|
+AUTHORS
|
||
|
+-------
|
||
|
+Harald Hoyer
|
||
|
+
|
||
|
+SEE ALSO
|
||
|
+--------
|
||
|
+*dracut*(8)
|
||
|
diff --git a/modules.d/98systemd/initrd-switch-root.service b/modules.d/98systemd/initrd-switch-root.service
|
||
|
index b443eab..bd9fb31 100644
|
||
|
--- a/modules.d/98systemd/initrd-switch-root.service
|
||
|
+++ b/modules.d/98systemd/initrd-switch-root.service
|
||
|
@@ -7,6 +7,7 @@
|
||
|
|
||
|
[Unit]
|
||
|
Description=Switch Root
|
||
|
+Documentation=man:initrd-switch-root.service(8)
|
||
|
DefaultDependencies=no
|
||
|
ConditionPathExists=/etc/initrd-release
|
||
|
OnFailure=emergency.service
|
||
|
diff --git a/modules.d/98systemd/initrd-switch-root.service.8.asc b/modules.d/98systemd/initrd-switch-root.service.8.asc
|
||
|
new file mode 100644
|
||
|
index 0000000..73d5c91
|
||
|
--- /dev/null
|
||
|
+++ b/modules.d/98systemd/initrd-switch-root.service.8.asc
|
||
|
@@ -0,0 +1,25 @@
|
||
|
+INITRD-SWITCH-ROOT.SERVICE(8)
|
||
|
+=============================
|
||
|
+:doctype: manpage
|
||
|
+:man source: dracut
|
||
|
+:man manual: dracut
|
||
|
+
|
||
|
+NAME
|
||
|
+----
|
||
|
+initrd-switch-root.service - switches root to the real root
|
||
|
+
|
||
|
+SYNOPSIS
|
||
|
+--------
|
||
|
+initrd-switch-root.service
|
||
|
+
|
||
|
+DESCRIPTION
|
||
|
+-----------
|
||
|
+This service triggers systemd to switch root from the initramfs to the real root.
|
||
|
+
|
||
|
+AUTHORS
|
||
|
+-------
|
||
|
+Harald Hoyer
|
||
|
+
|
||
|
+SEE ALSO
|
||
|
+--------
|
||
|
+*dracut*(8)
|
||
|
diff --git a/modules.d/98systemd/udevadm-cleanup-db.service b/modules.d/98systemd/udevadm-cleanup-db.service
|
||
|
index 7e47946..fba032a 100644
|
||
|
--- a/modules.d/98systemd/udevadm-cleanup-db.service
|
||
|
+++ b/modules.d/98systemd/udevadm-cleanup-db.service
|
||
|
@@ -7,6 +7,7 @@
|
||
|
|
||
|
[Unit]
|
||
|
Description=Cleanup udevd DB
|
||
|
+Documentation=man:udevadm-cleanup-db.service(8)
|
||
|
DefaultDependencies=no
|
||
|
ConditionPathExists=/etc/initrd-release
|
||
|
Conflicts=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket
|
||
|
diff --git a/modules.d/98systemd/udevadm-cleanup-db.service.8.asc b/modules.d/98systemd/udevadm-cleanup-db.service.8.asc
|
||
|
new file mode 100644
|
||
|
index 0000000..7837127
|
||
|
--- /dev/null
|
||
|
+++ b/modules.d/98systemd/udevadm-cleanup-db.service.8.asc
|
||
|
@@ -0,0 +1,25 @@
|
||
|
+UDEVADM-CLEANUP-DB.SERVICE(8)
|
||
|
+=============================
|
||
|
+:doctype: manpage
|
||
|
+:man source: dracut
|
||
|
+:man manual: dracut
|
||
|
+
|
||
|
+NAME
|
||
|
+----
|
||
|
+udevadm-cleanup-db.service - clean up the udev database
|
||
|
+
|
||
|
+SYNOPSIS
|
||
|
+--------
|
||
|
+udevadm-cleanup-db.service
|
||
|
+
|
||
|
+DESCRIPTION
|
||
|
+-----------
|
||
|
+Cleans up the udev database for later import in the real root by calling "udevadm info --cleanup-db".
|
||
|
+
|
||
|
+AUTHORS
|
||
|
+-------
|
||
|
+Harald Hoyer
|
||
|
+
|
||
|
+SEE ALSO
|
||
|
+--------
|
||
|
+*dracut*(8)
|