-
Notifications
You must be signed in to change notification settings - Fork 246
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
OS-8264 Pool-bootable SmartOS (and Triton) cannot handle sdc-factoryreset #1110
base: master
Are you sure you want to change the base?
Conversation
…eset OS-8578 Add "-s" option to sdc-factoryreset to poweroff CN instead of reboot
NOTE: Needs testing, but conceptually this is good. Will update ticket(s) with test results. |
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.
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! |
This may need to account for a shutdown rather than a reboot
also.. usage nit
|
function wipe_bootpools() | ||
{ | ||
# disable booting on all pools -- XXX KEBE ASKS, make this optional? | ||
for pool in $(piadm bootable | grep -v non-bootable | awk '{print $1}') | ||
do | ||
piadm bootable -d $pool | ||
done | ||
} | ||
|
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.
I'm very undecided as to whether I think this is ok here or if it should really be done in fs-joyent along with the rest of the pool resets.
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.
Me too, given work-Slack conversations (sorry folks in the open-source audience).
This is why 8264 was not examined a lot since its filing... we may want to split out 8578, and maybe have "wipe bootable now" in sdc-factoryreset
as its own non-default option as part of 8578, and fix 8264 in fs-joyent
.
OS-8578 Add "-s" option to sdc-factoryreset to poweroff CN instead of reboot