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

Collapse All | Expand All

(-)./checkfs.noCreateNode (-4 / +43 lines)
Lines 173-185 Link Here
173
		then
173
		then
174
			ebegin "Setting up the Logical Volume Manager"
174
			ebegin "Setting up the Logical Volume Manager"
175
			#still echo stderr for debugging
175
			#still echo stderr for debugging
176
			/sbin/vgscan >/dev/null
176
			echo -n Before vgscan:
177
			if [ "$?" -eq 0 ] && [ -x /sbin/vgchange ] && \
177
			[ -e /dev/mapper/control ] && echo "Node exists" || \
178
			echo "Node doesn't exist"
179
			/sbin/vgscan
180
			echo Vgscan returned $?
181
			echo -n After vgscan:
182
			[ -e /dev/mapper/control ] && echo "Node exists" || \
183
			echo "Node doesn't exist"
184
			#My patch (-e to check existence, -f would check being a regular
185
			#file!)
186
#			for ((i = 0; i < 4; i++))
187
#			do
188
#					if [ ! -e /dev/mapper/control ]
189
#					then
190
#							sleep 1
191
#					fi
192
#			done
193
#			[ -e /dev/mapper/control ] && echo "Node exists" || \
194
#			echo "Node doesn't exist"
195
196
			# Get major, minor, and mknod
197
			MAJOR=$(sed -n 's/^ *\([0-9]\+\) \+misc$/\1/p' /proc/devices)
198
			MINOR=$(sed -n "s/^ *\([0-9]\+\) \+device-mapper\$/\1/p" /proc/misc)
199
200
			if test -z "$MAJOR" -o -z "$MINOR" ; then
201
				eend 1 "$DM_NAME kernel module not loaded: can't create $CONTROL."
202
			fi
203
204
			mkdir -p --mode=755 /dev/mapper
205
			rm -f /dev/mapper/control
206
			mknod -m 0660 /dev/mapper/control c $MAJOR $MINOR
207
			unset MAJOR MINOR
208
			#Modified version
209
			if [ -x /sbin/vgchange ] && \
178
			   [ -f /etc/lvmtab -o -d /etc/lvm ]
210
			   [ -f /etc/lvmtab -o -d /etc/lvm ]
211
			#if [ "$?" -eq 0 ] && [ -x /sbin/vgchange ] && \
212
			#   [ -f /etc/lvmtab -o -d /etc/lvm ]
213
			##End my patch
179
			then
214
			then
180
				/sbin/vgchange -a y >/dev/null
215
				echo Before vgchange
216
				/sbin/vgchange -a y
217
				ret=$?
218
				#/sbin/vgchange -a y >/dev/null
219
				echo After vgchange
181
			fi
220
			fi
182
			eend $? "Failed to setup the LVM"
221
			eend $ret "Failed to setup the LVM"
183
		fi
222
		fi
184
	fi
223
	fi
185
224

Return to bug 71032