head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	2001.09.11.01.41.50;	author sgifford;	state Exp;
branches;
next	1.1;

1.1
date	2001.09.09.04.01.41;	author root;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Add DEBUG information.
Exit with a proper status.
@
text
@#!/bin/sh

if [ -n "$DEBUG" ]; then
  echo "$0: Beginning $1"
fi

case "$1" in
  up)
    if [ -z "${DHCP_DEV}" -o -z "${DHCP_IPADDR}" ]; then
      echo "$0: DHCP_DEV or DHCP_IPADDR not set!" 1>&2
      exit 1
    fi

    ifconfig_opts=""
		
    if [ -n "${DHCP_SUBNET_MASK}" ]; then
      ifconfig_opts="$ifconfig_opts netmask ${DHCP_SUBNET_MASK}"
    fi

    /sbin/ifconfig "${DHCP_DEV}" "${DHCP_IPADDR}" $ifconfig_opts up

    ;;

  down)
    /sbin/ifconfig "${DHCP_DEV}" down
    ;;

  *)
    echo "Usage: $0 up|down" 1>&2
    exit 1
    ;;
esac

if [ -n "$DEBUG" ]; then
  echo "$0: Ending $1"
fi

exit 0
@


1.1
log
@Initial revision
@
text
@d3 4
d33 6
@
