TWiki> DICE Web>AutoReboot (revision 2)EditAttach

Automatic Reboot on DICE machines


Including this in a DICE machine's profile:

#include <dice/options/autoreboot.h>

will make the machine start a reboot process if the updaterpms component has requested a reboot.

Options and Caveats

Autoreboot timing
The autoreboot process runs once a day between 1am and 2am.

Autoreboot delay
By default any reboot triggered by autoreboot is delayed by one week. This may be useful for office machines, for instance: the machine's user will receive several shutdown broadcasts during the week and may choose to reboot the machine at a more convenient time.

Changing the autoreboot delay period
The delay can be changed from the default by defining AUTOREBOOT_DELAY like this:

#include <dice/options/autoreboot.h>

The AUTOREBOOT_DELAY figure is a quantity of minutes so the above example would make a machine reboot after one hour. A delay of 60 minutes might be appropriate for student lab machines, for instance. To make reboots happen immediately, set the delay to 0 (zero).

Only updaterpms
The default behaviour on DICE machines is to take note of reboot requests from the updaterpms component only.

Adding more components to autoreboot
autoreboot can be told to take note of reboot requests from more components than just the default updaterpms by defining AUTOREBOOT_COMPONENTS to be the list of component to look at, as in this example:

#define AUTOREBOOT_COMPONENTS kernel hardware fstab updaterpms
#include <dice/options/autoreboot.h>

Cancelling an autoreboot
if autoreboot has started a shutdown process, and you want to cancel the shutdown process, login to the machine, become root and type
/sbin/shutdown -c
to cancel the shutdown. No more autoreboots will be attempted until the machine has been rebooted.

Disabling autoreboot completely
Don't include autoreboot.h smile
If you really must, include autoreboot.h but add some file resources to create a file called /var/lcfg/tmp/lcfgreboot. This will prevent autoreboot.h from ever starting a shutdown.

-- ChrisCooke - 07 Jun 2007

Edit | Attach | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 07 Jun 2007 - 15:39:56 - ChrisCooke
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies