File clearip of Package dhcp

#! /usr/bin/perl

# Author: Kevin C. Miller <>
# The copyright is with the author. We (SuSE) include this script
# with his permission.

# NOTE: you have to edit this script to make it functional for you.

use Expect;

if ($#ARGV == -1 ) {
  print "Usage: $0 [IP to reset] [server to reset on]\n";
  print "In most cases only one server needs to have the IP reset\n";
  print "and it generates the updates to get things in sync.\n";
  exit 1;

# Fill in your OMAPI key
my $KEY = "";

my $con = Expect->spawn("omshell");
$con->send("key defomapi $KEY\n");
$con->send("server $ARGV[1]\n");
$con->send("new lease\nset ip-address = $ARGV[0]\n");
$con->send("set state = 1\n");
openSUSE Build Service is sponsored by