From b84415d0f23a2419fba3c5db09acd63db3b713d0 Mon Sep 17 00:00:00 2001 From: Neil Schark <neil-jocelyn.schark@stud.h-da.de> Date: Thu, 8 Sep 2022 17:13:07 +0200 Subject: [PATCH] next try --- ztp-root/bootstrap/bootstrap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ztp-root/bootstrap/bootstrap b/ztp-root/bootstrap/bootstrap index fc20e84..9e8d2cf 100644 --- a/ztp-root/bootstrap/bootstrap +++ b/ztp-root/bootstrap/bootstrap @@ -18,13 +18,13 @@ def get_config(url): return def write_config(file_content): - with open('mnt/flash/startup-config', 'w') as file: + with open('/mnt/flash/startup-config', 'w') as file: file.write(file_content) def main(): mac_address = get_mac() parsed_mac = mac_address.replace(":", "") - url_with_config = HTTP_SERVER_CONFIG_BASE_URL + parsed_mac + "startup-config" + url_with_config = HTTP_SERVER_CONFIG_BASE_URL + parsed_mac + "/startup-config" startup_config = get_config(url_with_config) write_config(startup_config) -- GitLab