summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2009-05-28 20:27:17 -0400
committerBill Peck <bpeck@redhat.com>2009-05-28 20:27:17 -0400
commit1ce02165b81b310ce81fdfd3cabc9bd55ef9dbd0 (patch)
treeb58bcc82719e81b1c712a1c45da4039db3ad0eea
parent12befb5f33f2e322e0e73425fe41c02452822305 (diff)
use xmlrpc method for clearing console log
-rw-r--r--LabController/Makefile1
-rw-r--r--LabController/triggers/install/pre/clear_console_log.trigger24
-rw-r--r--Server/beaker/server/model.py2
3 files changed, 2 insertions, 25 deletions
diff --git a/LabController/Makefile b/LabController/Makefile
index d899037..efb40aa 100644
--- a/LabController/Makefile
+++ b/LabController/Makefile
@@ -11,7 +11,6 @@ install:
$(INSTALL) conf.d/beaker-lab-controller.conf $(DESTDIR)/etc/httpd/conf.d/beaker-lab-controller.conf
$(INSTALL_EXEC) cron.daily/expire_distros $(DESTDIR)/etc/cron.daily/expire_distros
$(INSTALL_EXEC) triggers/sync/post/osversion.trigger $(DESTDIR)/var/lib/cobbler/triggers/sync/post/osversion.trigger
- $(INSTALL_EXEC) triggers/install/pre/clear_console_log.trigger $(DESTDIR)/var/lib/cobbler/triggers/install/pre/clear_console_log.trigger
for snippet in $(SNIPPETS); do \
$(INSTALL) $$snippet $(DESTDIR)/var/lib/cobbler/$$snippet;\
done
diff --git a/LabController/triggers/install/pre/clear_console_log.trigger b/LabController/triggers/install/pre/clear_console_log.trigger
deleted file mode 100644
index 2bcc959..0000000
--- a/LabController/triggers/install/pre/clear_console_log.trigger
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/python
-
-import os
-import glob
-import sys
-
-if len(sys.argv) < 3:
- print "Missing required arguments"
- sys.exit(1)
-
-objtype = sys.argv[1] # "system" or "profile"
-name = sys.argv[2] # name of system or profile
-ip = sys.argv[3] # ip or "?"
-
-filename = "/var/consoles/%s" % name
-if os.path.isfile(filename):
- try:
- print "unlinking '%s'" % filename
- os.unlink(filename)
- except OSError, e:
- print "failed to unlink '%s'" % f
-
-sys.exit(0)
-
diff --git a/Server/beaker/server/model.py b/Server/beaker/server/model.py
index 5760b7b..5d49f1d 100644
--- a/Server/beaker/server/model.py
+++ b/Server/beaker/server/model.py
@@ -1102,6 +1102,8 @@ class System(SystemObject):
msg = "Success"
except:
rc=-1
+ if rc == 0:
+ rc = remote.clear_system_logs(system_id, token)
return (rc, msg)
def action_power(self, action="reboot"):