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

From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Sat 08 Nov 2003 - 01:30:35 GMT


Hi Folks!

recently we had some issues with rebootmgr and
after paul pointed out that there was a better
solution around (for a while) I had a look at
it, and made a patch for the development branch
(the original work was done by Paul Sladen et al)

how does this work?

simple, in a context != 0/1, the sys_reboot
invokes an userspace helper (similar to the
usb hotplug), in this case /sbin/vshelper or
whatever path is in /proc/sys/kernel/vshelper
with the following command arguments and
environment variables ...

</sbin/vshelper> <ctx-id> <command> [<arg>]

<command> = restart|halt|poweroff|restart2
<arg> = argument to restart2 (could be empty)

env['VS_CMD'] = the command as hex value
env['VS_UID'] = uid inside the vserver
env['VS_PID'] = pid inside the vserver

 LINUX_REBOOT_CMD_RESTART 0x01234567
 LINUX_REBOOT_CMD_HALT 0xCDEF0123
 LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF
 LINUX_REBOOT_CMD_CAD_OFF 0x00000000
 LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC
 LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4

http://vserver.13thfloor.at/Experimental/patch-2.4.23-pre9-vs1.1.0-reboot.diff

you can find related material at:
http://www.paul.sladen.org/vserver/sys_reboot/
(there is a schelper, which could be adapted
for the userspace helper)

please test it, and report any issues to me

TIA,
Herbert

_______________________________________________
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 Sat 08 Nov 2003 - 01:31:50 GMT by hypermail 2.1.3