summaryrefslogtreecommitdiffstats
path: root/triggers
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-05-05 14:46:37 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-05-05 14:46:37 -0400
commit19e53e8ad1a6889d020c6029d2d34273dacdc750 (patch)
tree70c2893fbaa56f2b1408f71bcb1091265590a21a /triggers
parent97cb9acc37c4b230f5ac914044d0425cf73a11d0 (diff)
downloadthird_party-cobbler-19e53e8ad1a6889d020c6029d2d34273dacdc750.tar.gz
third_party-cobbler-19e53e8ad1a6889d020c6029d2d34273dacdc750.tar.xz
third_party-cobbler-19e53e8ad1a6889d020c6029d2d34273dacdc750.zip
Always restart dhcp seperate from dns.
Diffstat (limited to 'triggers')
-rw-r--r--triggers/restart-services.trigger9
1 files changed, 2 insertions, 7 deletions
diff --git a/triggers/restart-services.trigger b/triggers/restart-services.trigger
index bc7c36e..d586f46 100644
--- a/triggers/restart-services.trigger
+++ b/triggers/restart-services.trigger
@@ -4,6 +4,8 @@ import cobbler.api as capi
import os
import sys
+#!/usr/bin/python
+
bootapi = capi.BootAPI()
settings = bootapi.settings()
manage_dhcp = str(settings.manage_dhcp).lower()
@@ -12,14 +14,10 @@ manage_dns = str(settings.manage_dns).lower()
omapi_enabled = settings.omapi_enabled
omapi_port = settings.omapi_port
-
-
-# We're just going to restart DHCPD if using ISC and if not using OMAPI at all
rc = 0
if manage_dhcp != "0":
if manage_dhcp_mode == "isc":
if not omapi_enabled:
- if not omapi_port:
rc = os.system("/sbin/service dhcpd restart")
elif manage_dhcp_mode == "dnsmasq":
rc = os.system("/sbin/service dnsmasq restart")
@@ -27,9 +25,6 @@ if manage_dhcp != "0":
print "- error: unknown DHCP engine: %s" % manage_dhcp_mode
rc = 411
-if rc != 0:
- sys.exit(rc)
-
if manage_dns != "0":
rc = os.system("/sbin/service named restart")