main/postmarketos-mkinitfs-hook-netboot: Use deviceinfo to determine rootfs sector size if set (MR 2898)
This commit is contained in:
parent
142a15c464
commit
b53b455af8
2 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Maintainer: Mark <clashclanacc2602@gmail.com>
|
# Maintainer: Mark <clashclanacc2602@gmail.com>
|
||||||
pkgname=postmarketos-mkinitfs-hook-netboot
|
pkgname=postmarketos-mkinitfs-hook-netboot
|
||||||
pkgver=1
|
pkgver=2
|
||||||
pkgrel=0
|
pkgrel=0
|
||||||
pkgdesc="Netboot postmarketOS using nbd feature"
|
pkgdesc="Netboot postmarketOS using nbd feature"
|
||||||
url="https://postmarketos.org"
|
url="https://postmarketos.org"
|
||||||
|
@ -21,6 +21,6 @@ package() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
9f302b5fb13966d1e6bd9445fe0cf12a2e4fc7e0db50837f3b772628d46df6bec70da00dec3c4ce6b33075e1f906c02f5b796ac521c609b082d2fe9a523fb6cb netboot.sh
|
5c70572944bce9abd4196b4fc8c2df9f90ec7e15d2ff8fce691120ee10f120521fa57f1d2c0edd1d489e113a2b16862d9e02b716e83e6d3251d7525a5152f349 netboot.sh
|
||||||
3c9c812a6cd25640e6cf4d722cff6c6356d5666ec6009b4c65f89e62211cc406d2cd09e0fdda6b1c1906ee32c3854988ab701cee8811208e3ef666f09e638568 netboot.modules
|
3c9c812a6cd25640e6cf4d722cff6c6356d5666ec6009b4c65f89e62211cc406d2cd09e0fdda6b1c1906ee32c3854988ab701cee8811208e3ef666f09e638568 netboot.modules
|
||||||
"
|
"
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
. ./init_functions.sh
|
. ./init_functions.sh
|
||||||
NBD_PORT=9999
|
NBD_PORT=9999
|
||||||
NBD_IP=172.16.42.2
|
NBD_IP=172.16.42.2
|
||||||
|
NBD_BLOCK_SIZE=${deviceinfo_rootfs_image_sector_size:-512}
|
||||||
|
|
||||||
setup_usb_network
|
setup_usb_network
|
||||||
start_unudhcpd
|
start_unudhcpd
|
||||||
|
@ -20,7 +21,7 @@ if [ ! -b /dev/nbd0 ]; then
|
||||||
pmos_loop_forever
|
pmos_loop_forever
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while ! busybox nbd-client $NBD_IP $NBD_PORT /dev/nbd0 -b 512; do
|
while ! busybox nbd-client $NBD_IP $NBD_PORT /dev/nbd0 -b "$NBD_BLOCK_SIZE"; do
|
||||||
echo "Connection attempt not successful, continuing..."
|
echo "Connection attempt not successful, continuing..."
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue