lvm2: Add initscript for lvmetad

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@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Michael Tremer
2020-01-15 15:20:12 +00:00
committed by Arne Fitzenreiter
parent dd5e20120e
commit 8893881160
6 changed files with 50 additions and 0 deletions

41
src/initscripts/system/lvmetad Executable file
View File

@@ -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