From b137b8f6b2a07b2df65a37d9a52122010f05a99c Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 29 Apr 2012 13:38:20 +0200 Subject: [PATCH] Added snide remark to vzctl developers --- frontend/classes/class.container.php | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/classes/class.container.php b/frontend/classes/class.container.php index 4988ec9..6fd003f 100644 --- a/frontend/classes/class.container.php +++ b/frontend/classes/class.container.php @@ -142,6 +142,7 @@ class Container extends CPHPDatabaseRecordClass $command = "vzctl stop {$this->sInternalId}"; $result = $this->sNode->ssh->RunCommand($command, false); + // vzctl is retarded enough to return exit status 0 when the command fails because the container isn't running, so we'll have to check the stderr for specific error string(s) as well. come on guys, it's 2012. if($result->returncode == 0 && strpos($result->stderr, "Unable to stop") === false) { $this->uStatus = CVM_STATUS_STOPPED;