From 3b295d4d046b22d4b6cecc2e2bbe333a4528a893 Mon Sep 17 00:00:00 2001 From: Adam Israel Date: Sun, 5 Feb 2023 18:48:23 -0500 Subject: [PATCH] fix: Change conn-check syntax Using the stock `recipe.json`, I encountered some syntax errors around the conn-check; ```bash wget -q --spider cloudflare.comif [ $? != 0 ]; thenecho 'No internet connection!'exit 1export DEBIAN_FRONTEND=noninteractive ``` where it should look like: ```bash wget -q --spider cloudflare.com if [ $? != 0 ]; then echo 'No internet connection!'exit 1 fi export DEBIAN_FRONTEND=noninteractive ``` --- vanilla_first_setup/utils/processor.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vanilla_first_setup/utils/processor.py b/vanilla_first_setup/utils/processor.py index 106a1f7..90beac2 100644 --- a/vanilla_first_setup/utils/processor.py +++ b/vanilla_first_setup/utils/processor.py @@ -85,12 +85,13 @@ class Processor: if "VANILLA_FAKE" in os.environ: f.write("echo 'VANILLA_FAKE is set, not running commands'\n") f.write("exit 0\n") - + # connection test - f.write("wget -q --spider cloudflare.com") - f.write("if [ $? != 0 ]; then") - f.write("echo 'No internet connection!'") - f.write("exit 1") + f.write("wget -q --spider cloudflare.com\n") + f.write("if [ $? != 0 ]; then\n") + f.write("echo 'No internet connection!'\n") + f.write("exit 1\n") + f.write("fi\n") for command in commands: if command.startswith("!nextBoot"):