Merge pull request #6266 from NixOS/stage1warn
stage-1-init: better warnings
This commit is contained in:
commit
3b65c29710
@ -7,6 +7,8 @@ export LD_LIBRARY_PATH=@extraUtils@/lib
|
|||||||
export PATH=@extraUtils@/bin
|
export PATH=@extraUtils@/bin
|
||||||
ln -s @extraUtils@/bin /bin
|
ln -s @extraUtils@/bin /bin
|
||||||
|
|
||||||
|
# Stop LVM complaining about fd3
|
||||||
|
export LVM_SUPPRESS_FD_WARNINGS=true
|
||||||
|
|
||||||
fail() {
|
fail() {
|
||||||
if [ -n "$panicOnFail" ]; then exit 1; fi
|
if [ -n "$panicOnFail" ]; then exit 1; fi
|
||||||
@ -347,7 +349,8 @@ while read -u 3 mountPoint; do
|
|||||||
# that we don't properly recognise.
|
# that we don't properly recognise.
|
||||||
if test -z "$pseudoDevice" -a ! -e $device; then
|
if test -z "$pseudoDevice" -a ! -e $device; then
|
||||||
echo -n "waiting for device $device to appear..."
|
echo -n "waiting for device $device to appear..."
|
||||||
for try in $(seq 1 20); do
|
try=20
|
||||||
|
while [ $try -gt 0 ]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
# also re-try lvm activation now that new block devices might have appeared
|
# also re-try lvm activation now that new block devices might have appeared
|
||||||
lvm vgchange -ay
|
lvm vgchange -ay
|
||||||
@ -355,8 +358,12 @@ while read -u 3 mountPoint; do
|
|||||||
udevadm trigger --action=add
|
udevadm trigger --action=add
|
||||||
if test -e $device; then break; fi
|
if test -e $device; then break; fi
|
||||||
echo -n "."
|
echo -n "."
|
||||||
|
try=$((try - 1))
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
|
if [ $try -eq 0 ]; then
|
||||||
|
echo "Timed out waiting for device $device, trying to mount anyway."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Wait once more for the udev queue to empty, just in case it's
|
# Wait once more for the udev queue to empty, just in case it's
|
||||||
|
Loading…
Reference in New Issue
Block a user