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

T4115:Reboot:Options "in" and "at" are not working as expected #1232

Merged
merged 1 commit into from
Feb 21, 2022

Conversation

srividya0208
Copy link
Contributor

Change Summary

When reboot is executed with "in" option it only accepts minutes till 99 value
and does not accept greater values and "at" is also working same like in option
where as it should work with exact timings.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://phabricator.vyos.net/T4115

Component(s) name

reboot

Proposed changes

vyos@vyos:~$ reboot in 99

Broadcast message from vyos@vyos (somewhere) (Wed Dec 29 19:30:13 2021):

System reboot is scheduled 99

Reboot is scheduled 2021-12-29 21:09:13
vyos@vyos:~$ reboot in 100
Invalid time "100". The valid format is HH:MM

Increased the value to accepts x number of minutes and to convert into date and time. Also modified the in option so that
it will only accepts Minutes XX not this format HH:MM and at option only accepts HH:MM DD/MM/YYYY

How to test

vyos@vyos:~$ reboot in 900

Broadcast message from vyos@vyos (somewhere) (Sun Feb 20 20:17:08 2022):

System reboot is scheduled 900

Reboot is scheduled 2022-02-21 11:17:08

vyos@vyos:~$ reboot at 33
Incorrect  format! Use HH:MM

vyos@vyos:~$ reboot at 09:00 date 21/02/2022

Broadcast message from vyos@vyos (somewhere) (Sun Feb 20 20:50:09 2022):

System reboot is scheduled 21/02/2022 09:00

Reboot is scheduled 2022-02-21 09:00:08


Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • [] I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

When reboot is executed with "in" option it only accepts minutes till 99 value
and does not accept greater values and "at" is also working same like in option
where as it should work with exact timings.
@jestabro jestabro merged commit 36a8c63 into vyos:current Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants