Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#!/bin/sh

cp /mnt/private/ELEGOO.txt /mnt/exUDISK/ELEGOO.txt && sync && sync

exit 0
4 changes: 2 additions & 2 deletions meta-opencentauri/images/files/centauri-carbon-2/copy-wifi.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
set -eu

src=/opt/usr/wifi/wpa_supplicant.conf
dest=/mnt/exUDISK/wpa_supplicant.conf
Expand All @@ -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

Expand All @@ -27,3 +25,5 @@ $psk
EOF

sync && sync

exit 0
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/sh
set -eu

versions=/opt/inst/firmware_version/versions.json
if grep -q 'Centauri Carbon 2' "$versions"; then
machine=centauri-carbon-2
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
12 changes: 6 additions & 6 deletions meta-opencentauri/images/files/centauri-carbon-2/sw-description
Original file line number Diff line number Diff line change
Expand Up @@ -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)";
}
);
Expand Down Expand Up @@ -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)";
}
);
Expand Down
Loading