From 027484431cad452cdd2a67d74bffa76e9cb00ddd Mon Sep 17 00:00:00 2001 From: Yinyin Liu Date: Wed, 24 Jul 2024 09:32:23 +0200 Subject: [PATCH] update venus release script with rezise function --- firmware/Venus_Release/update_Venus.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/firmware/Venus_Release/update_Venus.py b/firmware/Venus_Release/update_Venus.py index 1e5427516..bf69c40ad 100644 --- a/firmware/Venus_Release/update_Venus.py +++ b/firmware/Venus_Release/update_Venus.py @@ -38,6 +38,10 @@ async def start_battery_service(remote_host): # command = "/opt/victronenergy/serial-starter/start-tty.sh ttyUSB1" return await run_remote_command(remote_host, command) +async def resize(remote_host): + command = "sh /opt/victronenergy/swupdate-scripts/resize2fs.sh" + return await run_remote_command(remote_host, command) + async def upload_files(remote_host): file_location_mappings = { "rc.local": "/data/", @@ -100,13 +104,16 @@ async def main(remote_host): #### 3. import pika #### print("Import pika!") print(await import_pika(remote_host)) - # ##### 4. stop battery service ###### + #### 4. resize /dev/root ##### + print("Resize /dev/root now!") + print(await resize(remote_host)) + # ##### 5. stop battery service ###### # print("Stop battery service!") # print(await stop_battery_service(remote_host)) - ##### 5. run rc.local ###### + ##### 6. run rc.local ###### print("Run rc.local to set password, timezone and cp battery folder!") print(await run_rclocal(remote_host)) - # ##### 6. start battery service ###### + # ##### 7. start battery service ###### # print("Start battery service!") # print(await start_battery_service(remote_host))