dannf / ubuntu-server-netboot

Other
46 stars 9 forks source link

Added timeout feature for AutoInstall #25

Closed toledo-labs closed 1 year ago

toledo-labs commented 1 year ago

Types of changes

I added an update timeout method whenever AutoInstall is used. The default timeout is updated from 30 seconds to 1 second in the grub file.

Expected behavior

If AutoInstall in enabled the boot option menu appears for 1 second instead of 30. If this period is too short I'll change it in the code review.

dannf commented 1 year ago

Thanks - this does look valuable. One comment inline - also, would you mind updating the tests? I think this would make the existing one fail since the expected result still has set timeout=30

toledo-labs commented 1 year ago

Yes, I'll update the test and clear the line before setting the timeout=1. This way the solution will work for any timeout if set other than 30 in the future.

toledo-labs commented 1 year ago

The app was adding trailing newline characters in the grub file in both methods: add_kernel_params and update_timeout. Original ISO grubs files don't have trailing newline characters so I removed them in both routines.

Screenshot from 2023-10-16 17-16-06

dannf commented 1 year ago

Thanks - this is looking very close to ready. Would you mind removing the whitespace changes (mostly \n changes) to usn/ubuntu_server_netboot.py in commit 88b69328a4ce7cc6bc8f35fab95db75312d67663 ?

toledo-labs commented 1 year ago

I think I removed all the whitespace changes and amend the last commit.