summaryrefslogtreecommitdiff
path: root/rc.shutdown
diff options
context:
space:
mode:
authorIan-Xue Li <da.mi.spirit@gmail.com>2011-04-30 21:16:09 +0200
committerTom Gundersen <teg@jklm.no>2011-04-30 21:17:07 +0200
commit8dcc8d0e030aa4b84f02d1a862335afd74b772e8 (patch)
treeb619a030aa339bdf537cf7967ad7a87c566bf86c /rc.shutdown
parentbcbcea89b153aed0c905201c14ea3d3e3a1ee043 (diff)
rc.shutdown should recognize LVM upon LUKS option
This fixes FS#23889. Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-xrc.shutdown5
1 files changed, 5 insertions, 0 deletions
diff --git a/rc.shutdown b/rc.shutdown
index ec5fb9b..a78bc4d 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -65,6 +65,11 @@ stat_done
# Kill non-root encrypted partition mappings
if [[ -f /etc/crypttab && -n $CS ]] && /bin/grep -q ^[^#] /etc/crypttab; then
stat_busy "Deactivating encrypted volumes:"
+ # Maybe someone has LVM on an encrypted block device
+ # executing an extra vgchange is errorless
+ if [[ $USELVM =~ yes|YES ]]; then
+ /sbin/vgchange --sysinit -a n >/dev/null 2>&1
+ fi
do_lock() {
stat_append "${1}.."
if $CS remove "$1" >/dev/null 2>&1; then