]> git.pld-linux.org Git - packages/util-vserver.git/commitdiff
- CPUSET support for vserver.start and vserver.suexec
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 15 Aug 2005 18:19:07 +0000 (18:19 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    util-vserver-cpuset.patch -> 1.1

util-vserver-cpuset.patch [new file with mode: 0644]

diff --git a/util-vserver-cpuset.patch b/util-vserver-cpuset.patch
new file mode 100644 (file)
index 0000000..cb7e988
--- /dev/null
@@ -0,0 +1,71 @@
+diff -ur util-vserver-0.30.208/scripts/vserver-setup.functions util-vserver-0.30.208.cpuset/scripts/vserver-setup.functions
+--- util-vserver-0.30.208/scripts/vserver-setup.functions      2005-02-26 00:32:02.000000000 +0100
++++ util-vserver-0.30.208.cpuset/scripts/vserver-setup.functions       2005-08-15 20:16:58.741453736 +0200
+@@ -55,6 +55,8 @@
+                           this becomes a per vserver limit)
+                    private: No other process can join this security context.
+                           Even root
++    --cpuset <name>
++              ...  declares the CPUSET this vserver will run in [default: none]
+     --initstyle <style>
+                 ...  configures the initstyle (e.g. minit,sysv,plain)
+ "
+@@ -72,6 +74,7 @@
+       (--netbcast)    SETUP_NETBCAST=$2;;
+       (--interface)   SETUP_INTERFACES=( "${SETUP_INTERFACES[@]}" "$2" );;
+       (--initstyle)   SETUP_INITSTYLE=$2;;
++      (--cpuset)      SETUP_CPUSET=$2;;
+       (--flags)       old_IFS=$IFS
+                       IFS=,
+                       set -- $2
+@@ -150,6 +153,7 @@
+     _setup_writeSingleOption "$SETUP_NETPREFIX" "$cfgdir"/interfaces/prefix
+     _setup_writeSingleOption "$SETUP_NETBCAST"  "$cfgdir"/interfaces/bcast
+     _setup_writeSingleOption "$SETUP_INITSTYLE" "$cfgdir"/apps/init/style
++    _setup_writeSingleOption "$SETUP_CPUSET"    "$cfgdir"/cpuset
+     local idx=0
+     for i in "${SETUP_INTERFACES[@]}"; do
+diff -ur util-vserver-0.30.208/scripts/vserver.functions util-vserver-0.30.208.cpuset/scripts/vserver.functions
+--- util-vserver-0.30.208/scripts/vserver.functions    2005-07-03 19:47:06.000000000 +0200
++++ util-vserver-0.30.208.cpuset/scripts/vserver.functions     2005-08-15 20:16:58.743453432 +0200
+@@ -667,6 +667,17 @@
+     fi
+ }
++function addtoCPUSET
++{
++    local vdir=$1
++    local cpuset
++    local f="$vdir"/cpuset
++
++    test -e "$f" || return 0
++    read cpuset < "$f"
++    [ -e /dev/cpuset/$cpuset/tasks ] && echo $$ >/dev/cpuset/$cpuset/tasks
++}
++
+ function _mountVserverInternal
+ {
+     local fstab="$1"
+diff -ur util-vserver-0.30.208/scripts/vserver.start util-vserver-0.30.208.cpuset/scripts/vserver.start
+--- util-vserver-0.30.208/scripts/vserver.start        2005-07-15 21:01:06.000000000 +0200
++++ util-vserver-0.30.208.cpuset/scripts/vserver.start 2005-08-15 20:16:58.744453280 +0200
+@@ -97,6 +97,7 @@
+ mountVserver "$VSERVER_DIR"     && is_mounted=1
+ prepareInit  "$VSERVER_DIR"
++addtoCPUSET  "$VSERVER_DIR"
+ pushd "$VSERVER_DIR"/vdir/ >/dev/null
+ execScriptlets   "$VSERVER_DIR" "$VSERVER_NAME" pre-start
+diff -ur util-vserver-0.30.208/scripts/vserver.suexec util-vserver-0.30.208.cpuset/scripts/vserver.suexec
+--- util-vserver-0.30.208/scripts/vserver.suexec       2005-07-15 21:01:06.000000000 +0200
++++ util-vserver-0.30.208.cpuset/scripts/vserver.suexec        2005-08-15 20:16:58.745453128 +0200
+@@ -22,6 +22,7 @@
+     exit 1
+ }
+ generateOptions  "$VSERVER_DIR"
++addtoCPUSET  "$VSERVER_DIR"
+ user=$1
+ shift
This page took 0.129497 seconds and 4 git commands to generate.