-
Notifications
You must be signed in to change notification settings - Fork 11
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
Conversation
* Ensure work dir cleaned up * Update for revised takeover binary options * Use latest release Change-type: patch Signed-off-by: Ken Bannister <[email protected]>
@@ -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:?}/"* |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Change-type: patch