summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Geiger2011-08-24 14:50:37 +0200
committerBjörn Geiger2011-08-24 14:50:37 +0200
commitd4296b3d508ae80be78606a1fa801da7bb5a383a (patch)
tree38d5419810aaff92e7029e2a12ef890e11a95e31
parentMerge branch 'master' of git.openslx.org:lsfks/projekte/poolctrl (diff)
downloadpoolctrl-d4296b3d508ae80be78606a1fa801da7bb5a383a.tar.gz
poolctrl-d4296b3d508ae80be78606a1fa801da7bb5a383a.tar.xz
poolctrl-d4296b3d508ae80be78606a1fa801da7bb5a383a.zip
minor
-rw-r--r--application/configs/application.ini.dist2
-rw-r--r--gearman/controllerWorker/ControllerWorker/Boot.java37
-rw-r--r--gearman/controllerWorker/ControllerWorker/Shutdown.java35
-rw-r--r--setup/poolctrl.sql3
4 files changed, 34 insertions, 43 deletions
diff --git a/application/configs/application.ini.dist b/application/configs/application.ini.dist
index 813d3c3..9016687 100644
--- a/application/configs/application.ini.dist
+++ b/application/configs/application.ini.dist
@@ -42,6 +42,8 @@ gearman.worker.ps.blacklist.2 = thunderbird-bi
gearman.worker.ps.blacklist.3 = evince
gearman.worker.ps.blacklist.4 = soffice.bin
gearman.worker.ps.blacklist.5 = eclipse
+gearman.worker.ps.blacklist.6 = acroread
+gearman.worker.ps.blacklist.7 = libreoffice
gearman.worker.ps.whitelist.0 = gnome-screensav
gearman.worker.ps.whitelist.1 = Kscreensaver
event.updatePeriod = 5
diff --git a/gearman/controllerWorker/ControllerWorker/Boot.java b/gearman/controllerWorker/ControllerWorker/Boot.java
index dfbe3a0..4286b56 100644
--- a/gearman/controllerWorker/ControllerWorker/Boot.java
+++ b/gearman/controllerWorker/ControllerWorker/Boot.java
@@ -229,7 +229,6 @@ public class Boot extends Thread {
GearmanJobResult wolJobRes = wolJob.get();
String result = ByteUtils.fromUTF8Bytes(wolJobRes
.getResults());
- System.out.println(result.toString());
if (result.equals("Magic packet send.")) {
System.out.println(macAddress
+ " Magic packet send.");
@@ -476,28 +475,24 @@ public class Boot extends Thread {
}
if (blacklistFound) {
- System.out.println(ipAddress
- + " is working");
- status.put(clientID, 18); // is working
- psJobs.remove(clientID);
- } else if (whitelistFound) {
+ if (whitelistFound) {
+ /*
+ * System.out.println(ipAddress +
+ * " is not working"); // is not working
+ * status.put(clientID, 13);
+ * psJobs.remove(clientID);
+ */
+ } else {
+ System.out.println(ipAddress
+ + " is working");
+ status.put(clientID, 18); // is working
+ psJobs.remove(clientID);
+ }
+ } else {
System.out.println(ipAddress
+ " is not working");
- status.put(clientID, 13); // is not working
- psJobs.remove(clientID);
-
- } else {
- System.out
- .println(ipAddress
- + " Cannot check if user is working.");
- errors
- .put(clientID,
- "The check if a user is working has been failed.");
- /*
- * cannot check if user is working, go in
- * errorState
- */
- status.put(clientID, 29);
+ // is not working
+ status.put(clientID, 13);
psJobs.remove(clientID);
}
} else {
diff --git a/gearman/controllerWorker/ControllerWorker/Shutdown.java b/gearman/controllerWorker/ControllerWorker/Shutdown.java
index ba0e722..32a97b2 100644
--- a/gearman/controllerWorker/ControllerWorker/Shutdown.java
+++ b/gearman/controllerWorker/ControllerWorker/Shutdown.java
@@ -405,27 +405,24 @@ public class Shutdown extends Thread {
}
if (blacklistFound) {
- System.out.println(ipAddress
- + " is working");
- status.put(clientID, 11); // is working
- psJobs.remove(clientID);
- } else if (whitelistFound) {
+ if (whitelistFound) {
+ /*
+ * System.out.println(ipAddress +
+ * " is not working"); // is not working
+ * status.put(clientID, 4);
+ * psJobs.remove(clientID);
+ */
+ } else {
+ System.out.println(ipAddress
+ + " is working");
+ status.put(clientID, 11); // is working
+ psJobs.remove(clientID);
+ }
+ } else {
System.out.println(ipAddress
+ " is not working");
- status.put(clientID, 4); // is not working
- psJobs.remove(clientID);
- } else {
- System.out
- .println(ipAddress
- + " Cannot check if user is working.");
- errors
- .put(clientID,
- "The check if a user is working has been failed.");
- /*
- * cannot check if user is working, go in
- * errorState
- */
- status.put(clientID, 12);
+ // is not working
+ status.put(clientID, 4);
psJobs.remove(clientID);
}
} else {
diff --git a/setup/poolctrl.sql b/setup/poolctrl.sql
index 3580485..897229a 100644
--- a/setup/poolctrl.sql
+++ b/setup/poolctrl.sql
@@ -192,9 +192,6 @@ ALTER TABLE `poolctrl_eventreport`
ADD CONSTRAINT `pbs_eventreport_typeidC` FOREIGN KEY (`type`) REFERENCES `poolctrl_eventtype` (`eventtypeID`) ON DELETE CASCADE;
ALTER TABLE `poolctrl_event`
- ADD CONSTRAINT `poolctrl_event_poolidC` FOREIGN KEY (`pbs_poolID`) REFERENCES `pbs_pool` (`poolID`) ON DELETE CASCADE,
- ADD CONSTRAINT `poolctrl_event_bootosidC` FOREIGN KEY (`pbs_bootosID`) REFERENCES `pbs_bootos` (`bootosID`) ON DELETE CASCADE,
- ADD CONSTRAINT `poolctrl_event_membershipidC` FOREIGN KEY (`pbs_membershipID`) REFERENCES `pbs_membership` (`membershipID`) ON DELETE CASCADE,
ADD CONSTRAINT `poolctrl_event_categoryC` FOREIGN KEY (`category`) REFERENCES `poolctrl_eventcategory` (`eventcategoryID`) ON DELETE CASCADE,
ADD CONSTRAINT `poolctrl_event_runningtypeC` FOREIGN KEY (`runningtype`) REFERENCES `poolctrl_eventtype` (`eventtypeID`) ON DELETE SET NULL,
ADD CONSTRAINT `poolctrl_event_startC` CHECK (start > CURRENT_TIMESTAMP()),