Both SysVinit's and upstart's shutdown commands accept the number of
minutes with or without the plus sign.
'shutdown -h 1' works in RHEL 5, Fedora 14, Debian 6.
Let's be compatible.
https://bugzilla.redhat.com/show_bug.cgi?id=708886
if (streq(t, "now"))
*_u = 0;
- else if (t[0] == '+') {
+ else if (!strchr(t, ':')) {
uint64_t u;
- if (safe_atou64(t + 1, &u) < 0)
+ if (safe_atou64(t, &u) < 0)
return -EINVAL;
*_u = now(CLOCK_REALTIME) + USEC_PER_MINUTE * u;