mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-12 19:09:56 +03:00
pmb.netboot: Only attempt to install nbd after rootfs existance check (MR 2540)
The install action will initialise the native chroot, so this way we don't have to initialise the chroot in this code path. It also gives users feedback quicker if they haven't already initialised the rootfs since this way they don't have to wait around for nbd to be installed before being told that they need to generate the rootfs first. Closes https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2549
This commit is contained in:
parent
06bd8d98a1
commit
d01f6b9079
1 changed files with 2 additions and 2 deletions
|
@ -18,8 +18,6 @@ def start_nbd_server(device: str, replace: bool, ip: str = "172.16.42.2", port:
|
|||
:param port: port of nbd server
|
||||
"""
|
||||
|
||||
pmb.chroot.apk.install(["nbd"], Chroot.native())
|
||||
|
||||
chroot = Chroot.native()
|
||||
|
||||
rootfs_path = Path("/mnt/pmbootstrap/netboot") / f"{device}.img"
|
||||
|
@ -41,6 +39,8 @@ def start_nbd_server(device: str, replace: bool, ip: str = "172.16.42.2", port:
|
|||
f'serve --help" for more options.'
|
||||
)
|
||||
|
||||
pmb.chroot.apk.install(["nbd"], chroot)
|
||||
|
||||
logging.info(f"Running nbd server for {device} on {ip} port {port}.")
|
||||
|
||||
while True:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue