diff --git a/meta-opencentauri/images/files/centauri-carbon-2/copy-elegoo.sh b/meta-opencentauri/images/files/centauri-carbon-2/copy-elegoo.sh index 779850e2..9ec93598 100644 --- a/meta-opencentauri/images/files/centauri-carbon-2/copy-elegoo.sh +++ b/meta-opencentauri/images/files/centauri-carbon-2/copy-elegoo.sh @@ -1,2 +1,5 @@ #!/bin/sh + cp /mnt/private/ELEGOO.txt /mnt/exUDISK/ELEGOO.txt && sync && sync + +exit 0 diff --git a/meta-opencentauri/images/files/centauri-carbon-2/copy-wifi.sh b/meta-opencentauri/images/files/centauri-carbon-2/copy-wifi.sh index 0d5456e6..7b4d29b1 100755 --- a/meta-opencentauri/images/files/centauri-carbon-2/copy-wifi.sh +++ b/meta-opencentauri/images/files/centauri-carbon-2/copy-wifi.sh @@ -1,5 +1,4 @@ #!/bin/sh -set -eu src=/opt/usr/wifi/wpa_supplicant.conf dest=/mnt/exUDISK/wpa_supplicant.conf @@ -12,7 +11,6 @@ ssid=$(awk '/^[ \t]*ssid[ \t]*=/ { print; exit }' "$src") psk=$(awk '/^[ \t]*psk[ \t]*=/ { print; exit }' "$src") if [ -z "$ssid" ]; then - echo "No saved SSID; skipping WiFi export." exit 0 fi @@ -27,3 +25,5 @@ $psk EOF sync && sync + +exit 0 diff --git a/meta-opencentauri/images/files/centauri-carbon-2/detect-machine.sh b/meta-opencentauri/images/files/centauri-carbon-2/detect-machine.sh index 1ae1e7c6..a3cf7b54 100755 --- a/meta-opencentauri/images/files/centauri-carbon-2/detect-machine.sh +++ b/meta-opencentauri/images/files/centauri-carbon-2/detect-machine.sh @@ -1,5 +1,4 @@ #!/bin/sh -set -eu versions=/opt/inst/firmware_version/versions.json if grep -q 'Centauri Carbon 2' "$versions"; then @@ -7,9 +6,10 @@ if grep -q 'Centauri Carbon 2' "$versions"; then elif grep -q 'Centauri 2' "$versions"; then machine=centauri-2 else - echo "Unable to detect the printer model from $versions" >&2 - exit 1 + exit 0 fi fw_setenv machine_type "$machine" sync && sync + +exit 0 diff --git a/meta-opencentauri/images/files/centauri-carbon-2/sw-description b/meta-opencentauri/images/files/centauri-carbon-2/sw-description index 8c9cd7bf..0eec59eb 100644 --- a/meta-opencentauri/images/files/centauri-carbon-2/sw-description +++ b/meta-opencentauri/images/files/centauri-carbon-2/sw-description @@ -10,17 +10,17 @@ software = scripts: ( { filename = "copy-elegoo.sh"; - type = "postinstall"; + type = "preinstall"; sha256 = "$swupdate_get_sha256(copy-elegoo.sh)"; }, { filename = "copy-wifi.sh"; - type = "postinstall"; + type = "preinstall"; sha256 = "$swupdate_get_sha256(copy-wifi.sh)"; }, { filename = "detect-machine.sh"; - type = "postinstall"; + type = "preinstall"; sha256 = "$swupdate_get_sha256(detect-machine.sh)"; } ); @@ -124,17 +124,17 @@ software = scripts: ( { filename = "copy-elegoo.sh"; - type = "postinstall"; + type = "preinstall"; sha256 = "$swupdate_get_sha256(copy-elegoo.sh)"; }, { filename = "copy-wifi.sh"; - type = "postinstall"; + type = "preinstall"; sha256 = "$swupdate_get_sha256(copy-wifi.sh)"; }, { filename = "detect-machine.sh"; - type = "postinstall"; + type = "preinstall"; sha256 = "$swupdate_get_sha256(detect-machine.sh)"; } );