rebooting from %pre

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

 



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
hassle...

#include <sys/reboot.h>

int main(int argc, char **argv) {
    reboot(RB_AUTOBOOT);
}

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...

-- 
Jason Kohles                         A witty saying proves nothing.
email@xxxxxxxxxxxxxxx                   -- Voltaire (1694 - 1778)
http://www.jasonkohles.com/




[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux