]> git.pld-linux.org Git - packages/virt-what.git/commitdiff
differenciate between vserver host and guest master
authorElan Ruusamäe <glen@delfi.ee>
Sat, 31 Aug 2013 21:43:19 +0000 (00:43 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 31 Aug 2013 21:43:19 +0000 (00:43 +0300)
virt-what.spec
vserver-type.patch [new file with mode: 0644]

index 17d2a7a65cccd4c547c774ec42eece0650b11dfc..e8461575c69c00dfd27028f5f59b7d48ad62346c 100644 (file)
@@ -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 (file)
index 0000000..2fe09ca
--- /dev/null
@@ -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.
This page took 0.090458 seconds and 4 git commands to generate.