View | Details | Raw Unified | Return to bug 36599
Collapse All | Expand All

(-)a/branches/ucs-3.2/ucs-3.2-4/services/univention-support-info/univention-support-info (-11 / +11 lines)
 Lines 300-310   def simpleFiles(): Link Here 
300
	print 'done.'
300
	print 'done.'
301
301
302
def licenseObject():
302
def licenseObject():
303
	''' Get license object from ldap (cn=license) '''	
303
	''' Get license object from ldap (cn=license) '''
304
	stdout = executeCommand( 'univention-license-object', (_ldapsearchCommand(), '-x' , '-b', 'cn=license,cn=univention,'+ucr.get('ldap/base')) )
304
	stdout = executeCommand( 'univention-license-object', (_ldapsearchCommand(), '-x' , '-b', 'cn=license,cn=univention,'+ucr.get('ldap/base')) )
305
	addFile('info/univention-license-object', len(stdout), cStringIO.StringIO(stdout))
305
	addFile('info/univention-license-object', len(stdout), cStringIO.StringIO(stdout))
306
306
307
	
307
308
def checkMaintenance():
308
def checkMaintenance():
309
	''' Check if UCS-Version is in maintenance '''
309
	''' Check if UCS-Version is in maintenance '''
310
	if ucr.get('version/version') <= '2.3':
310
	if ucr.get('version/version') <= '2.3':
 Lines 347-353   def aptPackageList(): Link Here 
347
				print >> packagesUnknownSource, "%s\tUNKNOWN" % (pkg.name,)
347
				print >> packagesUnknownSource, "%s\tUNKNOWN" % (pkg.name,)
348
				continue
348
				continue
349
			print >> packagesAll, "%s\t%s" % (pkg.name, uri)
349
			print >> packagesAll, "%s\t%s" % (pkg.name, uri)
350
	
350
351
	addFile( 'info/packages_all', None, packagesAll )
351
	addFile( 'info/packages_all', None, packagesAll )
352
	addFile( 'info/packages_unknown-source', None, packagesUnknownSource )
352
	addFile( 'info/packages_unknown-source', None, packagesUnknownSource )
353
	print 'done.'
353
	print 'done.'
 Lines 421-429   def collectCommandData(): Link Here 
421
				'join-status':
421
				'join-status':
422
					('univention-check-join-status', ),
422
					('univention-check-join-status', ),
423
				'virsh-qemu':
423
				'virsh-qemu':
424
					('virsh', '-c', 'qemu:///system', 'capabilities', ),
424
					('timeout', '-k', '40', '30', 'virsh', '-c', 'qemu:///system', 'capabilities', ),
425
				'virsh-xen':
425
				'virsh-xen':
426
					('virsh', '-c', 'xen:///',		'capabilities', ),
426
					('timeout', '-k', '40', '30', 'virsh', '-c', 'xen+unix:///', 'capabilities', ),
427
				'top':
427
				'top':
428
					('top', '-b', '-n2', ),
428
					('top', '-b', '-n2', ),
429
				'testparm':
429
				'testparm':
 Lines 434-440   def collectCommandData(): Link Here 
434
					('/usr/share/univention-directory-listener/get_notifier_id.py', ),
434
					('/usr/share/univention-directory-listener/get_notifier_id.py', ),
435
				'mailq':
435
				'mailq':
436
					('mailq', ),
436
					('mailq', ),
437
		   		'univention-license-check':
437
				'univention-license-check':
438
					('univention-license-check', ),
438
					('univention-license-check', ),
439
				'hostaccount-id':
439
				'hostaccount-id':
440
					('id', ucr.get('hostname') + '$', ),
440
					('id', ucr.get('hostname') + '$', ),
 Lines 443-449   def collectCommandData(): Link Here 
443
	# Commands depending on samba version
443
	# Commands depending on samba version
444
	if sambaDomainVersion == 3:
444
	if sambaDomainVersion == 3:
445
		commands.update({'test-join':
445
		commands.update({'test-join':
446
							('net', 'rpc', 'testjoin', ),	
446
							('net', 'rpc', 'testjoin', ),
447
						})
447
						})
448
	elif sambaDomainVersion == 4:
448
	elif sambaDomainVersion == 4:
449
		commands.update({'net-ads-info':
449
		commands.update({'net-ads-info':
 Lines 586-592   def rotatedLogs(): Link Here 
586
			fileLinecount = 0
586
			fileLinecount = 0
587
			if number != -1:
587
			if number != -1:
588
				path += '.%d' % number
588
				path += '.%d' % number
589
			
589
590
			if gzipped:
590
			if gzipped:
591
				try:
591
				try:
592
					logfile = open(path + GzipSuffix, 'rb')
592
					logfile = open(path + GzipSuffix, 'rb')
 Lines 657-663   def atJobs(): Link Here 
657
	jobs = ''
657
	jobs = ''
658
	for job in at.list( extended=True ):
658
	for job in at.list( extended=True ):
659
		jobs += '\n'.join( (str(job), job.command) )
659
		jobs += '\n'.join( (str(job), job.command) )
660
	
660
661
	addFile('info/at-jobs', len(jobs), cStringIO.StringIO(jobs))
661
	addFile('info/at-jobs', len(jobs), cStringIO.StringIO(jobs))
662
662
663
663
 Lines 811-817   def autoupdate(): Link Here 
811
	(stdout, stderr) = process.communicate()
811
	(stdout, stderr) = process.communicate()
812
	if not process.returncode:
812
	if not process.returncode:
813
		log.info("Starting new script version")
813
		log.info("Starting new script version")
814
	 	os.execv(sys.argv[0], sys.argv)
814
		os.execv(sys.argv[0], sys.argv)
815
815
816
	if not internet_connection or univention_install_failed:
816
	if not internet_connection or univention_install_failed:
817
		# check if we did not update for some time
817
		# check if we did not update for some time
 Lines 832-838   def autoupdate(): Link Here 
832
			if answer.lower() in ('n', 'no'):
832
			if answer.lower() in ('n', 'no'):
833
				log.info("Ok, stopping as requested.\n")
833
				log.info("Ok, stopping as requested.\n")
834
				sys.exit(2)
834
				sys.exit(2)
835
		
835
836
836
837
def main(encrypt=False):
837
def main(encrypt=False):
838
	checkForRoot()
838
	checkForRoot()

Return to bug 36599