Handling -z option as SysVinit does

Kir Kolyshkin kir at openvz.org
Sat Jan 20 10:13:07 GMT 2007


Have you ever considered having the same -z option in upstart's
/sbin/init as SysVinit does?

Here is the extract from SysVinit manpage init(1), to get the idea
what I'm talking about:


BOOTFLAGS
       It  is possible to pass a number of flags to init from the boot
       monitor (eg. LILO). Init accepts the following flags:

       <....>

       -z xxx
            The argument to -z is ignored. You can use this to expand
            the command  line  a  bit, so that it takes some more
            space on the stack.
            Init can then manipulate the command line so that ps(1)
            shows  the current runlevel.


So, the main idea is just to expand command line length using -z xxx as
a padding so it could be used later. Even if upstart's init doesn't
currently change its argv[0], it may happen in future, and the command
like flags compatibility with SysVinit is nice anyway.

I am asking this because of one OpenVZ[1] users had a problem[2] running
Ubuntu-based Virtual Environment[3] recently. The problem is we run VE's
init with -z argument, and upstart fails. Adding handling of this option
should be trivial, I can send the patch if you like.

What do you think?

Regards,
  Kir.

[1] http://openvz.org/
[2] http://bugzilla.openvz.org/436
[3] http://wiki.openvz.org/VE



More information about the upstart-devel mailing list