View | Details | Raw Unified | Return to bug 44144 | Differences between
and this patch

Collapse All | Expand All

(-)univention-lib/python/admember.py (-6 / +7 lines)
 Lines 776-796    Link Here 
776
776
777
777
778
def invoke_service(service, cmd):
778
def invoke_service(service, cmd):
779
	if not os.path.exists('/etc/init.d/%s' % service):
779
	init_script = '/etc/init.d/%s' % service
780
	if not os.path.exists(init_script):
780
		return
781
		return
781
	try:
782
	try:
782
		p1 = subprocess.Popen(["invoke-rc.d", service, cmd],
783
		p1 = subprocess.Popen([init_script, cmd],
783
			close_fds=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
784
			close_fds=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
784
		stdout, stderr = p1.communicate()
785
		stdout, stderr = p1.communicate()
785
	except OSError as ex:
786
	except OSError as ex:
786
		ud.debug(ud.MODULE, ud.ERROR, "invoke-rc.d %s %s failed: %s" % (service, cmd, ex.args[1],))
787
		ud.debug(ud.MODULE, ud.ERROR, "%s %s failed: %s" % (init_script, cmd, ex.args[1],))
787
		return
788
		return
788
789
789
	if p1.returncode:
790
	if p1.returncode:
790
		ud.debug(ud.MODULE, ud.ERROR, "invoke-rc.d %s %s failed (%d)" % (service, cmd, p1.returncode,))
791
		ud.debug(ud.MODULE, ud.ERROR, "%s %s failed (%d)" % (init_script, cmd, p1.returncode,))
791
		return
792
		return
792
793
793
	ud.debug(ud.MODULE, ud.PROCESS, "invoke-rc.d %s %s: %s" % (service, cmd, stdout))
794
	ud.debug(ud.MODULE, ud.PROCESS, "%s %s: %s" % (init_script, cmd, stdout))
794
795
795
796
796
def do_time_sync(ad_ip):
797
def do_time_sync(ad_ip):
 Lines 1118-1124    Link Here 
1118
def disable_local_samba4():
1119
def disable_local_samba4():
1119
1120
1120
	ud.debug(ud.MODULE, ud.PROCESS, "Disable local samba4")
1121
	ud.debug(ud.MODULE, ud.PROCESS, "Disable local samba4")
1121
	stop_service("samba4")
1122
	stop_service("samba")
1122
	univention.config_registry.handler_set([u'samba4/autostart=false'])
1123
	univention.config_registry.handler_set([u'samba4/autostart=false'])
1123
1124
1124
1125
(-)univention-server/univention-fix-ucr-dns (-1 / +1 lines)
 Lines 143-149    Link Here 
143
143
144
144
145
def setup_logging():
145
def setup_logging():
146
	FORMAT = '%(asctime)-15s %(levelname)-7s %(name)-17s %(message)s'
146
	FORMAT = '%(asctime)-15s %(levelname)-7s %(module)-17s %(message)s'
147
	LEVELS = [ERROR, WARNING, INFO, DEBUG]
147
	LEVELS = [ERROR, WARNING, INFO, DEBUG]
148
	try:
148
	try:
149
		level = LEVELS[options.verbose]
149
		level = LEVELS[options.verbose]

Return to bug 44144