About this list Date view Thread view Subject view Author view Attachment view

From: Mark Lawrence (nomad_at_null.net)
Date: Fri 27 Feb 2004 - 14:10:32 GMT


On Thu, 26 Feb 2004, Herbert Poetzl wrote:

> On Thu, Feb 26, 2004 at 04:16:08PM +0000, Mark Lawrence wrote:

> > I've just re-read this, and realised you have not understood my mail on
> > this a month ago. My proposed format was (originally s/<call>/<action>/):
> >
> > vshelper <call> <ctx> [<arg...>]
> >
> > Where <call> depends on the system call or unique area of request from
> > the context. <call> would in fact *not* be "reboot" if vshelper was
> > called from somewhere else in the kernel.
> >
> > If you say that <action> must be one of restart|halt|poweroff... then I
> > say that the userspace helper should be called vsreboot and should not be
> > used for anything other than responding to sys_reboot. Then we can
> > implement another tool for any other userspace interaction.
>
> two simple questions:
>
> a) how would a "reboot" "poweroff" be handled differently
> in userspace from a "xyz" "poweroff"?

"reboot" "poweroff" implies something to do with power in the context of
the reboot system call.

"xyz" "poweroff" implies something to do with power in the context of the
"xyz" system call, but it is only valid to call vshelper with this if it
is defined as so. If "xyz" has nothing or knows nothing to do with power
then "poweroff" is an invalid argument.

> b) wouldn't passing an environmental var, like VS_SYS
> with VS_SYS="reboot" be as useful?

Why would you want to do that instead of a regular argument?

There is in fact already a precedent for calling userspace programs from
kernelspace, and that is hotplug. This is a mixture between our viewpoints
(first argument is category, actions are passed through environment
variables). Perhaps this is the method to follow.

I'm not dropping out of this discussion, but I'm on vacation for two weeks
and won't be able to reply for a while.

Cheers, Mark.

-- 
Mark Lawrence

_______________________________________________ Vserver mailing list Vserver_at_list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 27 Feb 2004 - 14:11:09 GMT by hypermail 2.1.3