Crypto related libraries should be used when proc is mounted

This commit adds changes to move setting password and updating some
other configuration bits when proc is mounted as when corssl is used,
it uses a library which requires proc to be available in order to
determine which module is being used.
This commit is contained in:
Waqar Ahmed
2022-08-17 23:17:54 +05:00
parent bcd1a4eef0
commit b6a8856c6b

View File

@@ -372,15 +372,6 @@ def main():
if IS_FREEBSD:
install_grub_freebsd(input, manifest, pool_name, dataset_name, disks)
else:
if password is not None:
run_command(["chroot", root, "/etc/netcli", "reset_root_pw", password])
if sql is not None:
run_command(["chroot", root, "sqlite3", "/data/freenas-v1.db"], input=sql)
if configure_serial:
configure_serial_port(root, os.path.join(root, "data/freenas-v1.db"))
undo = []
try:
run_command(["mount", "-t", "devtmpfs", "udev", f"{root}/dev"])
@@ -395,6 +386,15 @@ def main():
run_command(["mount", "-t", "zfs", f"{pool_name}/grub", f"{root}/boot/grub"])
undo.append(["umount", f"{root}/boot/grub"])
if password is not None:
run_command(["chroot", root, "/etc/netcli", "reset_root_pw", password])
if sql is not None:
run_command(["chroot", root, "sqlite3", "/data/freenas-v1.db"], input=sql)
if configure_serial:
configure_serial_port(root, os.path.join(root, "data/freenas-v1.db"))
# Set bootfs before running update-grub
run_command(["zpool", "set", f"bootfs={dataset_name}", pool_name])
if is_freebsd_upgrade: