From: Elan Ruusamäe Date: Sat, 31 Aug 2013 21:43:19 +0000 (+0300) Subject: differenciate between vserver host and guest X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=fff4a150af9302c7008fe7f51d2475fd2b2c4fe6;p=packages%2Fvirt-what.git differenciate between vserver host and guest --- diff --git a/virt-what.spec b/virt-what.spec index 17d2a7a..e846157 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -11,6 +11,7 @@ Group: Applications/Emulators Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz # Source0-md5: 28d3be1d8981e7fd83c012ebf0d95bb1 Patch0: bashisms.patch +Patch1: vserver-type.patch URL: http://people.redhat.com/~rjones/virt-what/ # This is provided by the build root, but we make it explicit # anyway in case this was dropped from the build root in future. @@ -58,6 +59,7 @@ Current types of virtualization detected: %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %configure diff --git a/vserver-type.patch b/vserver-type.patch new file mode 100644 index 0000000..2fe09ca --- /dev/null +++ b/vserver-type.patch @@ -0,0 +1,14 @@ +--- virt-what-1.13/virt-what.in 2013-09-01 00:35:37.865167616 +0300 ++++ virt-what-1.13/virt-what.in 2013-09-01 00:40:26.000000000 +0300 +@@ -147,6 +147,11 @@ + # Check for Linux-VServer + if cat "${root}/proc/self/status" | grep -q "VxID: [0-9]*"; then + echo linux_vserver ++ if grep -q "VxID: 0$" "${root}/proc/self/status"; then ++ echo linux_vserver_host ++ else ++ echo linux_vserver_guest ++ fi + fi + + # Check for UML.