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

[cmds] Update 'sys' and 'mknod' to work for updating ELKS #2186

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

ghaerr
Copy link
Owner

@ghaerr ghaerr commented Jan 16, 2025

Enhances the bin/sys shell script and mknod command to update an existing ELKS volume from the boot volume.

Discussed in #2181 (comment).

@floriangit: I created this PR as there might have been a misunderstanding about the need for set -e/set +e in bin/sys.
(set -e tells the shell to stop execution on an error). This PR fixes sys so that any error will stop the script, except for the makeboot execution, which as you pointed out returns the filesystem type as it's return value. So a set +e is required only before makeboot, and otherwise set -e is always set. Should makeboot encounter an error, it returns 255, and sys will return 1 (error) to its caller. Otherwise the script now will report "Finished successfully." to the user.

mknod was changed to return 0 on successful -p option, as discussed.

Also fixed is "Can't create symlink: File Exists", which is reported by cp -fR when copying a full system and encountering the symlink already created on the destination volume. The fix is to unlink the symlink prior to creating it, when the -f option is in effect.

@ghaerr ghaerr merged commit 46e8834 into master Jan 17, 2025
1 check passed
@ghaerr ghaerr deleted the sys branch January 17, 2025 00:01
@floriangit
Copy link
Contributor

very smooth updating now! 🥇

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