#!/bin/bash SRV_NIC=$1 PIDFILE="/var/run/dhclient.${1}.pid" DHCP_INIT="dhcp3-server" if [ -f $PIDFILE ];then kill -9 $(cat $PIDFILE) || true rm -f $PIDFILE fi ifdown $SRV_NIC || true &>/dev/null ifup $SRV_NIC || true &>/dev/null llxcfg-cpkg update if [ -x "/etc/init.d/$DHCP_INIT" ];then invoke-rc.d "$DHCP_INIT" restart || true fi if [ -x /sbin/resolvconf ];then dpkg-reconfigure --frontend noninteractive resolvconf /sbin/resolvconf -u fi exit 0