[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: rebooting from %pre

Since we're collecting %pre reboot entries, here's one
where I brought in the reboot binary:


I don't think this does much cleanup either, but being a
binary, you can call it via SSH (in my %pre I currently
add ntpdate, sshd, /dev/vcs, and reboot).


Jason Kohles wrote:

Digging through the archives I found several people who had tried the same
thing I was trying to do (reboot from %pre), but nobody who had made it work,
so I submit for the archives my solution, to save future searchers from the

#include <sys/reboot.h>

int main(int argc, char **argv) {

This thing doesn't sync your disks or kill your processes or anything nice
like that, it's the digital equivalent of an ice pick through the brain, so
be careful if you intend to use it in an environment where the data on the
disks matters...

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]