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

(-)univention-ldap/univention-backup2master (-3 / +6 lines)
 Lines 468-476    Link Here 
468
	# Move Samba4 FSMO roles to this host
468
	# Move Samba4 FSMO roles to this host
469
	#  https://forge.univention.org/bugzilla/show_bug.cgi?id=26986
469
	#  https://forge.univention.org/bugzilla/show_bug.cgi?id=26986
470
	if [ -x /usr/bin/samba-tool ]; then
470
	if [ -x /usr/bin/samba-tool ]; then
471
		if samba-tool fsmo show | grep -qi "CN=${old_ldap_master_hostname},CN=Servers,CN=[^,]*,CN=Sites,CN=Configuration"; then
471
		samba_tool_fsmo_output=$(samba-tool fsmo show)
472
			samba-tool fsmo seize --role=all --force
472
		while read -a rolename; do
473
		fi
473
			if echo "$samba_tool_fsmo_output" | grep "${rolename[0]}" | grep -qi "CN=${old_ldap_master_hostname},CN=Servers,CN=[^,]*,CN=Sites,CN=Configuration"; then
474
				samba-tool fsmo seize --role="${rolename[1]}"
475
			fi
476
		done <<<"$(printf 'InfrastructureMasterRole infrastructure\nRidAllocationMasterRole rid\nPdcEmulationMasterRole pdc\nDomainNamingMasterRole naming\nSchemaMasterRole schema')"
474
	fi
477
	fi
475
478
476
	samdb_remove_dc_account "$old_ldap_master_hostname"
479
	samdb_remove_dc_account "$old_ldap_master_hostname"

Return to bug 33384