Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to takeover upgrade script in preparation for release #408

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

kb2ma
Copy link
Contributor

@kb2ma kb2ma commented Dec 5, 2024

  • Ensure work dir cleaned up
  • Update for revised takeover binary options
  • Use latest release

Change-type: patch

* Ensure work dir cleaned up
* Update for revised takeover binary options
* Use latest release

Change-type: patch
Signed-off-by: Ken Bannister <[email protected]>
@kb2ma kb2ma requested a review from alexgg December 5, 2024 01:41
@flowzone-app flowzone-app bot enabled auto-merge December 5, 2024 01:43
@@ -186,7 +186,7 @@ function cleanup_work_dir() {
# Ensure takover path is not just '/' because deletion command is
if [[ -n "${work_dir}" && "${#work_dir}" -gt 3 ]]; then
if [[ -d "${work_dir}" ]]; then
rm -rf "${work_dir:?}/*"
rm -rf "${work_dir:?}/"*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need the globbing character outside the parentheses to work.

@@ -300,6 +300,11 @@ starttime=$(date +%s)
if [ -d "/mnt/data/resinhup" ] && [ ! -e "/mnt/data/balenahup" ]; then
ln -s "/mnt/data/resinhup" "/mnt/data/balenahup"
fi
# Directory for downloaded/temporary files. MUST be in data partition since stores
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved up higher in the script so always defined for users.

# data partition since stores sizable downloaded OS image. Conserves memory for
# takeover binary.
work_dir="/mnt/data/takeover"
# Ensure any already existing working directory is empty; takeover binary does
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just moved closer to where directory is created for clarity.

@flowzone-app flowzone-app bot merged commit 3a6cbed into master Dec 5, 2024
54 checks passed
@flowzone-app flowzone-app bot deleted the takeover-hup-fixes branch December 5, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants