clear_ip

来自「mysql+ha. 实现高可用性 http://code.google.com」· 代码 · 共 31 行

TXT
31
字号
#!/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 hereCheckInterfaceIP($iface, $ip, 0);# Clear ipClearInterfaceIP($iface, $ip);print "OK: IP deleted\n";exit(0);

⌨️ 快捷键说明

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