During system shutdown, init.d/lvm tries to run 'vgchange -a ln' to
close all LVs. It fails with root-on-LVM (or seperate /usr-on-LVM),
because those mountpoints are still in use. As a best-effort, consider
it done after the 'vgchange -a ln' pass. This is similar to localmount's
stop, which does not fail if a filesystem cannot be unmounted.
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ln ${VGS}\n"
# Order of this is important, have to work around dash and LVM readline
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
- ${_ending} $? "Failed (possibly some LVs still needed for /usr or root)"
+ rc=$?
+ msg="Failed (possibly some LVs still needed for /usr or root)"
+ [ "$RC_RUNLEVEL" = shutdown ] && msg="${msg} [rc=$rc]" && rc=0
+ ${_ending} $rc "${msg}"
fi
einfo "Finished shutting down the Logical Volume Manager"