From: Michael Prokop Date: Fri, 21 Apr 2017 12:10:10 +0000 (+0200) Subject: Adjust mdadm-raid + lvm2 messages and service handling for usage with systemd X-Git-Tag: v0.15.3~2 X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=ce5210b7e75aac4a11079f64640f545961be8db3 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. --- 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