Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 43146 | Differences between
and this patch

Collapse All | Expand All

(-)halt.sh.orig (+33 lines)
Lines 123-128 Link Here
123
done
123
done
124
eend 0
124
eend 0
125
125
126
# Try to remove any dm-crypt mappings
127
128
if [ -f /etc/conf.d/cryptomount ]
129
then
130
    ebegin "Removing dm-crypt mappings"
131
132
	/bin/egrep "^(mount|swap)" /etc/conf.d/cryptomount | \
133
	while read mountline
134
	do
135
		mount=
136
		swap=
137
		target=
138
139
		eval ${mountline}
140
141
		if [ -n "${mount}" ]
142
		then
143
			target=${mount}
144
		elif [ -n "${swap}" ]
145
		then
146
			target=${swap}
147
		else
148
			ewarn "Invalid line in /etc/conf.d/cryptomount: ${mountline}"
149
		fi
150
151
		einfo "Removing dm-crypt mapping for: ${target}"
152
		if ! /bin/cryptsetup remove ${target}
153
		then
154
			ewarn "Failed to remove dm-crypt mapping for: ${target}"
155
		fi
156
	done
157
fi
158
126
# Stop LVM
159
# Stop LVM
127
if [ -x /sbin/vgchange ] && [ -f /etc/lvmtab -o -d /etc/lvm ] && \
160
if [ -x /sbin/vgchange ] && [ -f /etc/lvmtab -o -d /etc/lvm ] && \
128
   [ -d /proc/lvm  -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
161
   [ -d /proc/lvm  -o "`grep device-mapper /proc/misc 2>/dev/null`" ]

Return to bug 43146