Hi,
I'm in need of rebooting a server 1 minute after I give the command. I'm used to
shutdown -r +1
which works as advertised. Now that shutdown is part of systemd http://www.freedesktop.org/software/systemd/man/shutdown.html and it is actually a link to it in CentOS 7, I've seen in the documentation https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Power.html that I can also use
systemctl reboot
But I can't find a way to provide a time specification in this latter form. What's the correct incantation?
TIA, Carlos.
Hello Carlos, You can try the 'at' command to achieve the same result. Regards, -Martín On May 14, 2015 12:13 AM, "Carlos A. Carnero Delgado" < carloscarnero@gmail.com> wrote:
Hi,
I'm in need of rebooting a server 1 minute after I give the command. I'm used to
shutdown -r +1
which works as advertised. Now that shutdown is part of systemd http://www.freedesktop.org/software/systemd/man/shutdown.html and it is actually a link to it in CentOS 7, I've seen in the documentation < https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/htm...
that I can also use
systemctl reboot
But I can't find a way to provide a time specification in this latter form. What's the correct incantation?
TIA, Carlos. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 14/05/15 13:44, Martin Cigorraga wrote:
Hello Carlos, You can try the 'at' command to achieve the same result. Regards, -Martín
or 'sleep'
On May 14, 2015 12:13 AM, "Carlos A. Carnero Delgado" < carloscarnero@gmail.com> wrote:
Hi,
I'm in need of rebooting a server 1 minute after I give the command. I'm used to
shutdown -r +1
which works as advertised. Now that shutdown is part of systemd http://www.freedesktop.org/software/systemd/man/shutdown.html and it is actually a link to it in CentOS 7, I've seen in the documentation < https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/htm...
that I can also use
systemctl reboot
But I can't find a way to provide a time specification in this latter form. What's the correct incantation?
TIA, Carlos. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Hi,
On Thu, May 14, 2015 at 1:11 AM, Peter Lawler centos@bleeter.id.au wrote:
On 14/05/15 13:44, Martin Cigorraga wrote:
Hello Carlos, You can try the 'at' command to achieve the same result. Regards, -Martín
or 'sleep'
Well, even though both could work, I fiinally went with the 'at' route, which goes wonderfully with the configuration management system I'm using http://www.ansible.com/home.
Thanks a lot!
On Wed, May 13, 2015 at 11:12:38PM -0400, Carlos A. Carnero Delgado wrote:
I'm in need of rebooting a server 1 minute after I give the command. I'm used to shutdown -r +1 which works as advertised. Now that shutdown is part of systemd http://www.freedesktop.org/software/systemd/man/shutdown.html and it is actually a link to it in CentOS 7, I've seen in the documentation
Have you tried this? It's a symlink, but systemctl knows to act differently when called as shutdown, and the traditional use still works. No need to hack around anything — just use 'shutdown -r' as always.
In Fedora at least, note that +1 is actually the _default_ — I think that's true in EL7 as well but I don't have a system handy to check. See `man shutdown` for more.
And `man systemd.time` for the time formats.
On Thu, May 14, 2015 at 9:59 AM, Matthew Miller mattdm@mattdm.org wrote:
Have you tried this? It's a symlink, but systemctl knows to act differently when called as shutdown, and the traditional use still works. No need to hack around anything — just use 'shutdown -r' as always.
Oh, yes! Both reboot and shutdown work as usual. I just wanted to know if there was a one-to-one mapping to the systemctl version.
Thanks a lot, Carlos.