system restart after some seconds

Polytropon freebsd at edvax.de
Sat Jan 5 07:58:41 UTC 2013


On Fri, 4 Jan 2013 23:43:57 -0800 (PST), Jack Mc Lauren wrote:
> How can I restart my freeBSD after specific seconds ?

Unelegant and obvious:

	# sleep 10 ; shutdown -r now

If you need this to happen automatically, use /etc/rc.local,
and maybe put the whole command into background using (...)&.
Beware - endless loop! You need to be fast enough to revert
the change or go to SUM to do so. :-)

Parameters to shutdown itself, as well as for the "at" command,
only allow minutes as most precise elements; see "man shutdown"
and "man at" for details.





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list