From ce5210b7e75aac4a11079f64640f545961be8db3 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 21 Apr 2017 14:10:10 +0200 Subject: [PATCH] Adjust mdadm-raid + lvm2 messages and service handling for usage with systemd The mdadm-raid unit is masked under systemd, instead it's necessary to start mdmonitor. Also lvm2 is masked and needs to be activated via lvm2-lvmetad instead. --- autoconfig.functions | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/autoconfig.functions b/autoconfig.functions index fa75044..6f774db 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -1644,7 +1644,11 @@ config_swraid(){ if ! checkbootparam 'swraid' ; then eindent - einfo "Just run 'Start mdadm-raid' to assemble md arrays or boot using 'swraid' as bootoption for autostart." + if $SYSTEMD ; then + einfo "Just run 'Start mdmonitor' to assemble md arrays or boot using 'swraid' as bootoption for autostart." + else + einfo "Just run 'Start mdadm-raid' to assemble md arrays or boot using 'swraid' as bootoption for autostart." + fi eoutdent else einfo "Bootoption swraid found. Searching for software RAID arrays:" @@ -1771,11 +1775,19 @@ config_lvm(){ if lvdisplay 2>&1 | grep -v 'No volume groups found' >/dev/null 2>&1 ; then einfo "You seem to have logical volumes (LVM) on your system." eindent - einfo "Just run 'Start lvm2' to activate them or boot using 'lvm' as bootoption for autostart." + if $SYSTEMD ; then + einfo "Just run 'Start lvm2-lvmetad' to activate them or boot using 'lvm' as bootoption for autostart." + else + einfo "Just run 'Start lvm2' to activate them or boot using 'lvm' as bootoption for autostart." + fi eend 0 if checkbootparam 'lvm' ; then einfo "Bootoption LVM found. Searching for logical volumes:" - service_wrapper lvm2 start ; eend $? + if $SYSTEMD ; then + service_wrapper lvm2-lvmetad start ; eend $? + else + service_wrapper lvm2 start ; eend $? + fi fi eoutdent fi -- 2.1.4