Commit 5db5e68f authored by Rostislav Spinar's avatar Rostislav Spinar
Browse files

setter: update gwImage after mender update

parent 79c6b232
......@@ -20,6 +20,7 @@ import os
import random
import time
import uuid
import subprocess
import netifaces
from websocket import create_connection
......@@ -317,6 +318,12 @@ def touch(path):
def main():
# don't run when we have flag set
if os.path.exists("/data/setter/bootpart"):
# update gw version after update
cfg = load_config()
curVersion = subprocess.check_output("cat /etc/os-release | grep VERSION_ID | cut -d \"=\" -f 2", shell=True)
cfg['gwImage'] = "iqube-yocto-" + curVersion.rstrip()
print('Setter was started. Exit')
return 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment