lxcenter/hypervm — comment on commit a5bf9953b95e7c4cee30b0e5e3d73ad93ce1cdd9
File: hypervm/httpdocs/lib/vps/driver/vps__xenlib.php line 786
By shazarlx:

Done.

-Will

----- Original Message -----
From: "Ángel Guzmán Maeso"

To: "shazarlx"
Sent: Sunday, January 22, 2012 8:42 AM
Subject: Re: [hypervm] Added template name based pygrub support. (#269)
(a5bf995)

> -What means $pygrub_r? The name is confusing.
> -You should use brackets too for single if lines.
> - Use PHP_EOL instead of /n.
> - Is really needed that kernel, root and bootloader assignments are in the
> same line?
> - Change double quotes by single quotes.
>
> For the moment (expecting more data from you) this should be the right
> code:
>

> // Add pygrub configuration if template name contains pygrub
> $pygrub_r = explode('-', $this->main->ostemplate);
> if (stripos($pygrub_r[3], 'pygrub') !== FALSE) {
> $string .= 'kernel = \'\';root = \'\';bootloader = \'/usr/bin/pygrub\''
> . PHP_EOL;
> }
>

>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/lxcenter/hypervm/commit/a5bf9953b95e7c4cee30b0e5e3d73ad93ce1cdd9#commitcomment-889940