Make a special file in /etc updated on first boot #26

Closed
lee.miller wants to merge 3 commits from lee.miller/openwrt:files into main
Showing only changes of commit 2fc39b6c39 - Show all commits

View File

@ -6,7 +6,9 @@ if [ ! -e /etc/rootpt-resize ] \
then
ROOT_BLK="$(readlink -f /sys/dev/block/"$(awk -e \
'$9=="/dev/root"{print $3}' /proc/self/mountinfo)")"
ROOT_DISK="/dev/$(basename "${ROOT_BLK%/*}")"
DEV_NAME=$(basename "${ROOT_BLK%/*}")
[ ${DEV_NAME%%[0-9]*} == mmcblk ] || exit 1
ROOT_DISK="/dev/${DEV_NAME}"
ROOT_PART="${ROOT_BLK##*[^0-9]}"
parted -l ---pretend-input-tty << EOI
ok