- clean up vserver_set_rlimit()
[util-vserver.git] / python / vserver.py
index 9c967ee..f580354 100644 (file)
@@ -131,7 +131,7 @@ class VServer:
             old_hard, old_soft, old_minimum = self.__get_vserver_limit(resource_type)
             if old_hard != VC_LIM_KEEP and old_hard <> hard: changed = True
             if old_soft != VC_LIM_KEEP and old_soft <> soft: changed = True
-            if old_minimu != VC_LIM_KEEP and old_minimum <> minimum: changed = True
+            if old_minimum != VC_LIM_KEEP and old_minimum <> minimum: changed = True
             self.limits_changed = self.limits_changed or changed 
             ret = vserverimpl.setrlimit(self.ctx,resource_type,hard,soft,minimum)
 
@@ -377,8 +377,8 @@ class VServer:
         self.__do_chcontext(state_file)
 
     def start(self, wait, runlevel = 3):
-
         self.vm_running = True
+        self.limits_changed = False
 
         child_pid = os.fork()
         if child_pid == 0:
@@ -469,9 +469,9 @@ class VServer:
         return size
 
     def stop(self, signal = signal.SIGKILL):
-
         vserverimpl.killall(self.ctx, signal)
         self.vm_running = False
+        self.limits_changed = False