mirror of
https://github.com/jumperfly/initramfs-overlay.git
synced 2025-04-27 13:50:06 +03:00
Minor fixes
This commit is contained in:
parent
bd7fd3cc84
commit
8b704ea70f
1 changed files with 3 additions and 2 deletions
5
src/init
5
src/init
|
@ -28,13 +28,14 @@ while [[ $ATTEMPTS -lt $MAX_WAIT ]] && ! findfs $OVERLAY_DEVICE > /dev/null; do
|
||||||
let ATTEMPTS=ATTEMPTS+1
|
let ATTEMPTS=ATTEMPTS+1
|
||||||
done
|
done
|
||||||
if [[ $ATTEMPTS -eq $MAX_WAIT ]]; then
|
if [[ $ATTEMPTS -eq $MAX_WAIT ]]; then
|
||||||
echo "***** Boot device not detected: $OVERLAY_DEVICE *****" >&2
|
echo "***** Overlay device not detected: $OVERLAY_DEVICE *****" >&2
|
||||||
echo "Exiting..." >&2
|
echo "Exiting..." >&2
|
||||||
sleep 5
|
sleep 5
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mount device containing updated image (if any)
|
# Mount device containing updated image (if any)
|
||||||
|
sleep 1
|
||||||
if findfs $NEWIMG_DEVICE &> /dev/null; then
|
if findfs $NEWIMG_DEVICE &> /dev/null; then
|
||||||
mount -t ext4 $NEWIMG_DEVICE /mnt/newimg
|
mount -t ext4 $NEWIMG_DEVICE /mnt/newimg
|
||||||
if [[ -e /mnt/newimg/$OS_IMAGE ]]; then
|
if [[ -e /mnt/newimg/$OS_IMAGE ]]; then
|
||||||
|
@ -56,7 +57,7 @@ fi
|
||||||
mount -t ext4 -o ro $IMG_DEVICE /mnt/img
|
mount -t ext4 -o ro $IMG_DEVICE /mnt/img
|
||||||
|
|
||||||
# Mount boot device and load squashfs module if present
|
# Mount boot device and load squashfs module if present
|
||||||
if findfs $BOOT_DEVIC &> /dev/null; then
|
if findfs $BOOT_DEVICE &> /dev/null; then
|
||||||
mount -t vfat -o ro $BOOT_DEVICE /boot
|
mount -t vfat -o ro $BOOT_DEVICE /boot
|
||||||
if [[ -e /boot/modules/$(uname -r)/squashfs.ko ]]; then
|
if [[ -e /boot/modules/$(uname -r)/squashfs.ko ]]; then
|
||||||
insmod /boot/modules/$(uname -r)/squashfs.ko
|
insmod /boot/modules/$(uname -r)/squashfs.ko
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue