From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH 5/5] lvm2: Add initscript for lvmetad
Date: Wed, 15 Jan 2020 15:20:12 +0000 [thread overview]
Message-ID: <20200115152012.12345-5-michael.tremer@ipfire.org> (raw)
In-Reply-To: <20200115152012.12345-1-michael.tremer@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 5285 bytes --]
This daemon needs to be launched in order to use LVM
devices in IPFire.
It will run on all installations after this patch has been
merged but only consumes very little memory.
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
---
config/rootfiles/common/aarch64/initscripts | 2 +
config/rootfiles/common/armv5tel/initscripts | 2 +
config/rootfiles/common/i586/initscripts | 2 +
config/rootfiles/common/x86_64/initscripts | 2 +
lfs/initscripts | 1 +
src/initscripts/system/lvmetad | 41 ++++++++++++++++++++
6 files changed, 50 insertions(+)
create mode 100755 src/initscripts/system/lvmetad
diff --git a/config/rootfiles/common/aarch64/initscripts b/config/rootfiles/common/aarch64/initscripts
index 202da7372..ddf098ed4 100644
--- a/config/rootfiles/common/aarch64/initscripts
+++ b/config/rootfiles/common/aarch64/initscripts
@@ -26,6 +26,7 @@ etc/rc.d/init.d/functions
etc/rc.d/init.d/halt
etc/rc.d/init.d/ipsec
etc/rc.d/init.d/leds
+etc/rc.d/init.d/lvmetad
etc/rc.d/init.d/localnet
etc/rc.d/init.d/modules
etc/rc.d/init.d/mountfs
@@ -180,6 +181,7 @@ etc/rc.d/rc6.d/S99reboot
etc/rc.d/rcsysinit.d/S00mountkernfs
etc/rc.d/rcsysinit.d/S01sysctl
etc/rc.d/rcsysinit.d/S05modules
+etc/rc.d/rcsysinit.d/S09lvmetad
etc/rc.d/rcsysinit.d/S10udev
etc/rc.d/rcsysinit.d/S19waitdrives
etc/rc.d/rcsysinit.d/S20swap
diff --git a/config/rootfiles/common/armv5tel/initscripts b/config/rootfiles/common/armv5tel/initscripts
index 202da7372..ddf098ed4 100644
--- a/config/rootfiles/common/armv5tel/initscripts
+++ b/config/rootfiles/common/armv5tel/initscripts
@@ -26,6 +26,7 @@ etc/rc.d/init.d/functions
etc/rc.d/init.d/halt
etc/rc.d/init.d/ipsec
etc/rc.d/init.d/leds
+etc/rc.d/init.d/lvmetad
etc/rc.d/init.d/localnet
etc/rc.d/init.d/modules
etc/rc.d/init.d/mountfs
@@ -180,6 +181,7 @@ etc/rc.d/rc6.d/S99reboot
etc/rc.d/rcsysinit.d/S00mountkernfs
etc/rc.d/rcsysinit.d/S01sysctl
etc/rc.d/rcsysinit.d/S05modules
+etc/rc.d/rcsysinit.d/S09lvmetad
etc/rc.d/rcsysinit.d/S10udev
etc/rc.d/rcsysinit.d/S19waitdrives
etc/rc.d/rcsysinit.d/S20swap
diff --git a/config/rootfiles/common/i586/initscripts b/config/rootfiles/common/i586/initscripts
index 9d4f7e5f3..e666ed84e 100644
--- a/config/rootfiles/common/i586/initscripts
+++ b/config/rootfiles/common/i586/initscripts
@@ -26,6 +26,7 @@ etc/rc.d/init.d/functions
etc/rc.d/init.d/halt
etc/rc.d/init.d/ipsec
etc/rc.d/init.d/leds
+etc/rc.d/init.d/lvmetad
etc/rc.d/init.d/localnet
etc/rc.d/init.d/modules
etc/rc.d/init.d/mountfs
@@ -179,6 +180,7 @@ etc/rc.d/rc6.d/S99reboot
etc/rc.d/rcsysinit.d/S00mountkernfs
etc/rc.d/rcsysinit.d/S01sysctl
etc/rc.d/rcsysinit.d/S05modules
+etc/rc.d/rcsysinit.d/S09lvmetad
etc/rc.d/rcsysinit.d/S10udev
etc/rc.d/rcsysinit.d/S19waitdrives
etc/rc.d/rcsysinit.d/S20swap
diff --git a/config/rootfiles/common/x86_64/initscripts b/config/rootfiles/common/x86_64/initscripts
index 9d4f7e5f3..e666ed84e 100644
--- a/config/rootfiles/common/x86_64/initscripts
+++ b/config/rootfiles/common/x86_64/initscripts
@@ -26,6 +26,7 @@ etc/rc.d/init.d/functions
etc/rc.d/init.d/halt
etc/rc.d/init.d/ipsec
etc/rc.d/init.d/leds
+etc/rc.d/init.d/lvmetad
etc/rc.d/init.d/localnet
etc/rc.d/init.d/modules
etc/rc.d/init.d/mountfs
@@ -179,6 +180,7 @@ etc/rc.d/rc6.d/S99reboot
etc/rc.d/rcsysinit.d/S00mountkernfs
etc/rc.d/rcsysinit.d/S01sysctl
etc/rc.d/rcsysinit.d/S05modules
+etc/rc.d/rcsysinit.d/S09lvmetad
etc/rc.d/rcsysinit.d/S10udev
etc/rc.d/rcsysinit.d/S19waitdrives
etc/rc.d/rcsysinit.d/S20swap
diff --git a/lfs/initscripts b/lfs/initscripts
index d74e0c650..3a769bd99 100644
--- a/lfs/initscripts
+++ b/lfs/initscripts
@@ -161,6 +161,7 @@ $(TARGET) :
ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs
ln -sf ../init.d/sysctl /etc/rc.d/rcsysinit.d/S01sysctl
ln -sf ../init.d/modules /etc/rc.d/rcsysinit.d/S05modules
+ ln -sf ../init.d/lvmetad /etc/rc.d/rcsysinit.d/S09lvmetad
ln -sf ../init.d/udev /etc/rc.d/rcsysinit.d/S10udev
ln -sf ../init.d/waitdrives /etc/rc.d/rcsysinit.d/S19waitdrives
ln -sf ../init.d/swap /etc/rc.d/rcsysinit.d/S20swap
diff --git a/src/initscripts/system/lvmetad b/src/initscripts/system/lvmetad
new file mode 100755
index 000000000..fdae39fd9
--- /dev/null
+++ b/src/initscripts/system/lvmetad
@@ -0,0 +1,41 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/lvmeta2
+#
+# Description : LVM2 Metadata Daemon
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+ start)
+ # Create diretory for control socket
+ mkdir -p /run/lvm
+
+ boot_mesg "Starting LVM2 Metadata Daemon..."
+ loadproc /usr/sbin/lvmetad
+ ;;
+
+ stop)
+ boot_mesg "Stopping LVM2 Metadata Daemon..."
+ killproc /usr/sbin/lvmetad
+ ;;
+
+ restart)
+ ${0} stop
+ sleep 1
+ ${0} start
+ ;;
+
+ status)
+ statusproc /usr/sbin/lvmetad
+ ;;
+
+ *)
+ echo "Usage: ${0} {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/lvmetad
--
2.20.1
prev parent reply other threads:[~2020-01-15 15:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-15 15:20 [PATCH 1/5] lvm2: Ship with core system Michael Tremer
2020-01-15 15:20 ` [PATCH 2/5] lvm2: Build with support for udev Michael Tremer
2020-01-15 15:20 ` [PATCH 3/5] lvm2: Enable lvmetad Michael Tremer
2020-01-15 15:20 ` [PATCH 4/5] lvm2: Create lock files in /run/lvm Michael Tremer
2020-01-15 15:20 ` Michael Tremer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200115152012.12345-5-michael.tremer@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox