Bug 708886 - shutdown says 'Failed to parse time specification'
Summary: shutdown says 'Failed to parse time specification'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Schmidt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 715148 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-30 02:59 UTC by ryo fujita
Modified: 2022-10-12 16:39 UTC (History)
11 users (show)

Fixed In Version: systemd-26-8.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-15 01:23:13 UTC
Type: ---


Attachments (Terms of Use)

Description ryo fujita 2011-05-30 02:59:39 UTC
Description of problem:
After issuing 'shutdown -r 0', got a message 'Failed to parse time specification'

Version-Release number of selected component (if applicable):
sytemd-26-2.fc15

How reproducible:
Issuing 'shutdown -r number' without plus sign. 

Steps to Reproduce:
1. Issuing a command with option described above.
2.
3.
  
Actual results:
Getting a message 

Expected results:
Restart or Shutdown will start.

Additional info:
systemd-26/src/systemctl.c
After 'if' directive in line 4775, lines are needed in order to parse t[] not including plus sign.

4769 static int parse_time_spec(const char *t, usec_t *_u) {
4770         assert(t);
4771         assert(_u);
4772 
4773         if (streq(t, "now"))
4774                 *_u = 0;
4775         else if (t[0] == '+') {
4776                 uint64_t u;
4777 
4778                 if (safe_atou64(t + 1, &u) < 0)
4779                         return -EINVAL;
4780 
4781                 *_u = now(CLOCK_REALTIME) + USEC_PER_MINUTE * u;
4782         } else {

But shutdown(8) says a plus sign '+' is needed before number spec.
Is it a specification of systemd?

Comment 1 Michal Schmidt 2011-06-22 07:09:43 UTC
*** Bug 715148 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Update System 2011-07-04 20:33:49 UTC
systemd-26-6.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/systemd-26-6.fc15

Comment 4 Fedora Update System 2011-07-06 21:39:25 UTC
Package systemd-26-7.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-26-7.fc15'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/systemd-26-7.fc15
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-07-12 05:04:57 UTC
Package systemd-26-8.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-26-8.fc15'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/systemd-26-8.fc15
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-07-15 01:22:36 UTC
systemd-26-8.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 hannaen 2022-10-12 16:39:52 UTC
(In reply to Fedora Update System from comment #5)
> Package systemd-26-8.fc15:
> * should fix your issue,
> * was pushed to the Fedora 15 testing repository,
> * should be available at your local mirror within two days.
> Update it with: https://lol-beans.com
> # su -c 'yum update --enablerepo=updates-testing systemd-26-8.fc15'
> as soon as you are able to, then reboot.
> Please go to the following url:
> https://admin.fedoraproject.org/updates/systemd-26-8.fc15
> then log in and leave karma (feedback).

I should add


Note You need to log in before you can comment on or make changes to this bug.