On Tue, 16.07.13 12:50, Ramkumar Ramachandra ([email protected]) wrote:
> --- a/man/systemd-detect-virt.xml
> +++ b/man/systemd-detect-virt.xml
> @@ -70,6 +70,7 @@
> <varname>microsoft</varname>,
> <varname>oracle</varname>, <varname>xen</varname>,
> <varname>bochs</varname>, <varname>chroot</varname>,
> + <varname>uml</varname>,
> <varname>openvz</varname>, <varname>lxc</varname>,
> <varname>lxc-libvirt</varname>,
> <varname>systemd-nspawn</varname>.</para>
Please also update the docs in systemd.unit(5), for ConditionVirtualization.
> + r = read_full_file("/proc/cpuinfo", &cpuinfo_contents, NULL);
> + if (r < 0)
> + return r;
> + if (strstr(cpuinfo_contents, "vendor_id\t: User Mode Linux\n")) {
> + *id = "uml";
> + return 1;
> + }
Could you also look for the \n before the line? I'd really like to make
sure this detects this on a separate line only:
strstr(cpuinfo_contents, "\nvendor_id\t: User Mode Linux\n")
(I'd just make the change myself and commit it, but I don't want to
commit this without testing, and I have no UML machine around, so I can
test this.)
Lennart
--
Lennart Poettering - Red Hat, Inc.
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel