[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] execve() in reboot.c ?
On 7/25/05, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx> wrote: > > Domain kernel has arch/xen/kernel/reboot.c, which executes > > shutdown and halt on request. But one problem is that we have > > the path and command options fixed in the kernel, like this: > > > > > > static char *restart_argv[] = { "/sbin/shutdown", "-r", > > "now", NULL }; > > static char *poweroff_argv[] = { "/sbin/halt", "-p", > > NULL }; > > > > > > That is kind of violating the rule: kernel should never > > enforce the policy to the user. We can see the problem if for > > example domU uses busybox instead of sysvinit: busybox doesnt > > support "halt -p", so "xm shutdown" cannot shutdown the domU. > > Would 'telinit 1' / 'telinit 6' work on busybox ? > Unfortunately telinit is not available in busybox. Here are 2 patches (for -testing and -unstable), in which i replaced shutdown and halt with poweroff and reboot, and executes those without any options. This patch confirms to work with both sysvinit (on Ubuntu) and busybox (ttylinux - without these patch i couldnt shutdown ttylinux with "xm shutdown"). Please apply. Signed-off-by: Nguyen Anh Quynh <aquynh@xxxxxxxxx> $ diffstat shutdown.testing.patch reboot.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) $ diffstat shutdown.unstable.patch reboot.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Attachment:
shutdown.unstable.patch Attachment:
shutdown.testing.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |