Skip to content
New issue

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

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

Already on GitHub? # to your account

OS-8264 Pool-bootable SmartOS (and Triton) cannot handle sdc-factoryreset #1110

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

danmcd
Copy link
Contributor

@danmcd danmcd commented Sep 19, 2024

OS-8578 Add "-s" option to sdc-factoryreset to poweroff CN instead of reboot

@danmcd danmcd requested a review from a team September 19, 2024 18:36
@danmcd
Copy link
Contributor Author

danmcd commented Sep 19, 2024

NOTE: Needs testing, but conceptually this is good. Will update ticket(s) with test results.

Copy link
Contributor

@tsoome tsoome left a comment

Choose a reason for hiding this comment

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

You can do like this:

shutdown=""

in case statement
s) shutdown=yes;;

and then

if [[ $shutdown ]]; then
poweroff
else
reboot
fi

Might be just a bit easier to read (less chars to process;)

@danmcd
Copy link
Contributor Author

danmcd commented Sep 19, 2024

You can do like this:

shutdown=""

in case statement s) shutdown=yes;;

and then

if [[ $shutdown ]]; then poweroff else reboot fi

Might be just a bit easier to read (less chars to process;)

Even better might be to just set a variable to the desired last-command!

@nheimlich
Copy link

nheimlich commented Sep 19, 2024

This may need to account for a shutdown rather than a reboot

printf "\n\nRebooting in 5 seconds ... "

also.. usage nit

printf "\nUsage: $myname [-h | --help]\n\n"

printf "\n\n$final_command in 5 seconds ... "

@danmcd danmcd marked this pull request as draft November 19, 2024 19:00
@danmcd
Copy link
Contributor Author

danmcd commented Nov 19, 2024

Moving this back to draft to cleave out 8578 as its own, lower-impact, PR, namely #1112

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants