On 10/06/2010 04:15 PM, Gustavo Sverzut Barbieri wrote:
From: Fabiano Fidencio<[email protected]>
This functions are working as follows:
- Send a SIGTERM to all processes that may be finished
- Send a SIGKILL to all processes that still live and may be finished
- Try to unmount all mount points
- Try to remount read-only all mount points that can't be umounted
- Umount all swap devices
- Umount and detach all loopback devices
- Call [poweroff|halt|reboot|kexec]
TODO:
- Umount device-mapper.
- Make log work. So far it is being useless as we do not parse
/etc/systemd/system.conf, kernel command line but just
environment, however we're executed by init and thus have no
useful variables. Forcing it to target=kmsg/console and
level=debug also does not produce any output, however writing to
/dev/console does work (hack used during debug).
....
+ } else {
+ const char *args[5] = {KEXEC_BINARY_PATH, "-e", "-x",
"-f", NULL};
+ execv(args[0], (char * const *) args);
+ return EXIT_FAILURE;
+ }
From the kexec manpage:
-x (--no-ifdown)
Shut down the running kernel, but restore the interface on
reload. (If this option is used, it must be specified last.)
So, does it have to be:
const char *args[5] = {KEXEC_BINARY_PATH, "-e", "-f", "-x", NULL};
??
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel