-
Notifications
You must be signed in to change notification settings - Fork 92
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
*: drop dialog #16
*: drop dialog #16
Conversation
973ed3e
to
5f5dbce
Compare
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.
a few comments and some follow up comments about behavior in a minute.
@@ -1,7 +1,5 @@ | |||
#!/bin/bash | |||
|
|||
DEFAULT_IMAGE_URL='https://example.com/fedora-coreos.raw.gz' | |||
|
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.
FYI @yuqi-zhang ^^. If we merge this we'll be dropping the need for any patching here.
coreos-installer
Outdated
sleep 5 | ||
reboot | ||
fi | ||
} | ||
|
||
USAGE="Usage: $0 [options] |
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.
thoughts on making this block into a function and calling it from main()
?
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 initially had it in a function and it seemed to be breaking getopts
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.
Did you try calling the function with $@
as an argument. i.e. process_args $@
@@ -7,6 +7,7 @@ Type=simple | |||
ExecStart=/usr/libexec/coreos-installer | |||
#StandardInput=tty-force | |||
StandardInput=tty | |||
StandardOutput=journal+console |
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.
the PR description says kmsg+console
- did that change in an update after the PR was created?
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.
It was lost in a rebase and I just picked journal+console
, I'll update back to kmsg
On a successful install I see:
On an unsucessfull install: I provided a bogus URL and my system just stayed at:
So it doesn't look like it is hitting the emergency target ? |
Hmm, my local builds are hitting the emergency shell, I'll go back through and make sure I don't have something out of date that's causing a discrepancy. |
Updated. Looks like the Other notable changes in this last patch:
|
coreos-installer
Outdated
# If the image hasn't show up yet then wait a sec and loop | ||
if [ ! -f /mnt/dl/imagefile.gz ]; then | ||
sleep 1 | ||
continue | ||
fi | ||
PART_FILE_SIZE=$(ls -l /mnt/dl/imagefile.gz | awk '{print $5}') 2>/dev/null | ||
PCT=$(dc -e"2 k $PART_FILE_SIZE $IMAGE_SIZE / 100 * p" | sed -e"s/\..*$//" 2>/dev/null) | ||
echo $PCT | ||
echo "$PCT%" >&2 |
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.
this still uses echo.. did you mean to point to stderr and not stdout?
also we might want to do "${PCT}%"
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 intentionally didn't log this to /tmp/debug
as I didn't think it was useful outside of watching it on the console. I can switch it to the log
method if you think it has value.
As far as writing to stderr, everything being printed on the serial console is being written to stderr (log
is doing it as well).
Will update the variable wrapping.
Emergency.target seems to work now and the output from a successful install looks better:
One nit might be to change |
Drops dialog and switches to text based output. Now exits to the emergency shell and allows /usr/libexec/coreos-installer to be ran as a script.
Update pushed.
|
LGTM |
With coreos#16 we no longer need `chvt`, `lsblk` or `tee`.
With #16 we no longer need `chvt`, `lsblk` or `tee`.
Switches to
echo "" >&2
and updates theStandardOutput
of thecoreos-installer.service
tokmsg+console
. This makes the installerbe non-interactive. Later patches will drop into a shell in the
initramfs if all required parameters are not given.