⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 check_ip

📁 mysql+ha. 实现高可用性 http://code.google.com/p/mysql-master-master/
💻
字号:
#!/usr/bin/env perl# Use mandatory external modulesuse strict;use Cwd;use File::Basename;# Determine installation dir nameour $SELF_DIR = dirname(dirname(Cwd::abs_path(__FILE__)));# Include parts of the systemrequire $SELF_DIR . '/lib/ifconfig.pm';# Check paramsif (scalar(@ARGV) < 2) {    print "Usage: $0 <ip-address> <interface>\n\n";    exit(1);}my $ip = $ARGV[0];my $iface = $ARGV[1];# Check if ip is already hereCheckInterfaceIP($iface, $ip, 1);# Add interface ipAddInterfaceIP($iface, $ip);# Send ARP packet to notify all about ip assignmentSendArpNotification($iface, $ip);print "OK: IP has been address added\n";exit(0);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -