summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rw-r--r--debian/install1
-rw-r--r--debian/postinst1
-rw-r--r--enable-exec-in-new-partition.patch11
4 files changed, 19 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 98d5c6e..8dd5e8c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+autopatch-util-vserver (0.2-1) unstable; urgency=low
+
+ * Added patch for supporting vserver ... exec for guests with a own partition.
+
+ -- Alexander Sulfrian <alexander@sulfrian.net> Fri, 21 Apr 2011 03:19:00 +0200
+
autopatch-util-vserver (0.1-1) unstable; urgency=low
* Initial release
diff --git a/debian/install b/debian/install
index 9f0d6f5..b688f23 100644
--- a/debian/install
+++ b/debian/install
@@ -1 +1,2 @@
vserver-teardown.patch /usr/share/autopatch-util-vserver/
+enable-exec-in-new-partition.patch /usr/share/autopatch-util-vserver/
diff --git a/debian/postinst b/debian/postinst
index f523649..6e2e6d0 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -21,6 +21,7 @@ test "$1" = "configure" -o "$1" = "triggered" && test -r /usr/sbin/vserver && {
mkdir -p /var/lib/autopatch-util-vserver/backup/
cp -a /usr/sbin/vserver /var/lib/autopatch-util-vserver/backup/vserver
patch -f -r - -p 0 < /usr/share/autopatch-util-vserver/vserver-teardown.patch
+ patch -f -r - -p 0 < /usr/share/autopatch-util-vserver/enable-exec-in-new-partition.patch
}
# dh_installdeb will replace this with shell code automatically
diff --git a/enable-exec-in-new-partition.patch b/enable-exec-in-new-partition.patch
new file mode 100644
index 0000000..fca5bb7
--- /dev/null
+++ b/enable-exec-in-new-partition.patch
@@ -0,0 +1,11 @@
+--- vserver 2011-04-21 03:09:34.000000000 +0200
++++ /usr/sbin/vserver 2011-04-21 03:12:45.000000000 +0200
+@@ -208,7 +208,7 @@
+ . $__PKGLIBDIR/vserver.functions
+
+ # Enter the namespace early so we can test for files inside the guest
+-test "$cmd" != enter -a "$cmd" != stop || \
++test "$cmd" != enter -a "$cmd" != stop -a "$cmd" != exec || \
+ test -n "$OPTION_NONAMESPACE" || isAvoidNamespace "$VSERVER_DIR" || \
+ ! isVserverRunning "$VSERVER_DIR" || {
+ $_VNAMESPACE --enter "$VSERVER_DIR" -- $_VSERVER ----nonamespace "${OPTIONS_ORIG[@]}"