Skip to content

Commit

Permalink
v8.23 (#6698)
Browse files Browse the repository at this point in the history
- VisionFive 2 | Automatically reboot on first boot if an overlay was applied
  • Loading branch information
MichaIng authored Oct 21, 2023
2 parents 61ee075 + 9eef13b commit 11f5250
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rootfs/var/lib/dietpi/services/dietpi-firstboot.bash
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ _EOF_
esac

# VisionFive 2
elif [[ $G_HW_MODEL == 81 && -f '/proc/device-tree/serial-number' ]]
elif [[ $G_HW_MODEL == 81 && -f '/proc/device-tree/serial-number' && -f '/boot/extlinux/extlinux.conf' ]] && ! grep -q '^[[:blank:]]*fdtoverlays[[:blank:]]' /boot/extlinux/extlinux.conf
then
local serial overlays=()
read -r serial < /proc/device-tree/serial-number
Expand Down Expand Up @@ -148,6 +148,7 @@ _EOF_
G_CONFIG_INJECT 'fdtoverlays[[:blank:]]' "fdtoverlays ${overlays[*]}" /boot/extlinux/extlinux.conf
fi
fi
grep -q '^[[:blank:]]*fdtoverlays[[:blank:]]' /boot/extlinux/extlinux.conf && { reboot; exit 0; }
fi

# End user automated script
Expand Down

0 comments on commit 11f5250

Please sign in to comment.