From 911d45c65bcdd9b8d53c8762ef0e62a5437f8734 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 02 Nov 2010 11:05:41 -0400
Subject: [PATCH] Added a new tool to force DNS Resyncs.

---
 server/mods-available/remoteaction_core_module.inc.php |   42 +++++++++++++++++++++++++-----------------
 1 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/server/mods-available/remoteaction_core_module.inc.php b/server/mods-available/remoteaction_core_module.inc.php
index e5e8868..fa51db1 100644
--- a/server/mods-available/remoteaction_core_module.inc.php
+++ b/server/mods-available/remoteaction_core_module.inc.php
@@ -110,20 +110,22 @@
 		/*
 		 * process all actions
 		*/
-		foreach ($actions as $action) {
-			if ($action['action_type'] == 'os_update') {
-				/* do the update */
-				$this->_doOsUpdate($action);
-				/* this action takes so much time,
-				  * we stop executing the actions not to waste more time */
-				return;
-			}
-			if ($action['action_type'] == 'ispc_update') {
-				/* do the update */
-				$this->_doIspCUpdate($action);
-				/* this action takes so much time,
-				  * we stop executing the actions not to waste more time */
-				return;
+		if(is_array($actions)) {
+			foreach ($actions as $action) {
+				if ($action['action_type'] == 'os_update') {
+					/* do the update */
+					$this->_doOsUpdate($action);
+					/* this action takes so much time,
+					* we stop executing the actions not to waste more time */
+					return;
+				}
+				if ($action['action_type'] == 'ispc_update') {
+					/* do the update */
+					$this->_doIspCUpdate($action);
+					/* this action takes so much time,
+					* we stop executing the actions not to waste more time */
+					return;
+				}
 			}
 		}
 	}
@@ -132,9 +134,15 @@
 		/*
 		 * Do the update
 		 */
-		exec("aptitude update");
-		exec("aptitude upgrade -y");
-
+		//TODO : change this when distribution information has been integrated into server record
+		if(file_exists('/etc/gentoo-release')) {
+			exec("glsa-check -f --nocolor affected");
+		}
+		else {
+			exec("aptitude update");
+			exec("aptitude upgrade -y");
+		}
+		
 		/*
 		 * All well done!
 		 */

--
Gitblit v1.9.1