📄 ldap-check-replica
字号:
#!/usr/bin/perl## Check proper installation of LDAP replication # by pfalcon@sourceforge.net 2001-01-16# $Id: ldap-check-replica,v 1.2 2002/12/23 13:17:14 lo-lan-do Exp $#require("include.pl"); # Include all the predefined functions&parse_local_inc;$ldap1="sf-ldap1";$ldap2="sf-ldap2";print "Making change to the master server.\n";$time=time();$cmd = "echo 'dn: cn=Replicator,dc=sourceforge,dc=netchangetype: modifyreplace: descriptiondescription: modified at $time' |${ldap_prefix}ldapmodify -h $ldap1 -p $ldap1 -D '$sys_ldap_bind_dn' -w $sys_ldap_passwd";system($cmd);print "Allowing for propogation delay...\n\n";sleep(10);print "Querying master server:\n";$cmd = "${ldap_prefix}ldapsearch -h $ldap1 -p $sys_ldap_port -LLL -D '$sys_ldap_bind_dn' -w $sys_ldap_passwd -b '$sys_ldap_base_dn' '(cn=Replicator)' description";system($cmd);print "Querying slave server 1:\n";$cmd = "${ldap_prefix}ldapsearch -h $ldap2 -p $sys_ldap_port -LLL -D '$sys_ldap_bind_dn' -w $sys_ldap_passwd -b '$sys_ldap_base_dn' '(cn=Replicator)' description";system($cmd);print "If two requests above differ, LDAP replication is NOT functioning\n";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -