In the script: /lib/rcscript/addons/multipath-stop.sh Line 13-14: # Stop LVM2 if [ -x /sbin/multipath -a dm_in_proc ]; then Reproducible: Always Steps to Reproduce: 1. Compile a kernel without lvm support 2. Use openrc and baselayout2 Actual Results: * Shutting down Multipath devices ... /proc/misc: No entry for device-mapper found Is device-mapper driver missing from kernel? /proc/devices: No entry for device-mapper found Failed to set up list of device-mapper major numbers * Failed to shut down Multipath devices [ !! ] * ERROR: multipath failed to stop Expected Results: The if condition from line 14 should fail Fix: Line 13-14: # Stop LVM2 if [ -x /sbin/multipath -a dm_in_proc -ne 2 ]; then device-mapper should have been grepped in /proc/devices or /proc/misc or Line 13-14: # Stop LVM2 if [ -x /sbin/multipath -a dm_in_proc -eq 0 ]; then device-mapper should have been grepped in /proc/devices and /proc/misc
if you dont have support in your kernel, you shouldnt be adding the init.d script in the first place to a runlevel there is a bug in the script, but not what you show. the [ dm_in_proc ] is evaluating it as a string, not as a command. it should be '...] || dm_in_proc ;' multipath-tools-0.4.9-r2 installs an init.d script without this bug
(In reply to comment #1) > if you dont have support in your kernel, you shouldnt be adding the init.d > script in the first place to a runlevel > Multipath-tools is installed by default as a dependency from openrc (baselayout2). It adds itself to the boot level. In this case grepping the content of the two /proc files in dm_in_proc should prevent to do something when no lvm ? (In reply to comment #1) > there is a bug in the script, but not what you show. the [ dm_in_proc ] is > evaluating it as a string, not as a command. it should be '...] || dm_in_proc > ;' > > multipath-tools-0.4.9-r2 installs an init.d script without this bug I assumed the dm_in_proc was correctly evaluated and focused only on the return value. Thanks for fixing this.
i see no logic in openrc that auto-adds the multipath init.d script to any runlevel. you'll need to provide examples.
I don't remember to add it myself to the boot runlevel (but it's rather long time I switched to openrc, so maybe I did) At least if I did, I think I was intimed to do it * If you use baselayout2, you must add 'multipath' into * your boot runlevel! by reading only the last lines of the install messages.
yes, that message used to exist, but the point there was "if you use multipath, you must install the init.d script". otherwise, there wouldnt be much point to installing the multipath package in the first place.