#!/bin/sh
#
# network: Initialize or shutdown a PCMCIA ethernet adapter
# Author: Shun-ichi TAHARA <jado@flowernet.gr.jp>
# Time-stamp: <04/10/14 10:56:57 jado@sheira>
#
# Copyright (c) 2001 Shun-ichi TAHARA
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#

usage ()
{
    echo "usage: network [action] [device]"
    echo "  actions: start stop restart"
    exit 1
}

if [ $# -lt 2 ]; then
    usage
fi

ACTION=$1
DEVICE=$2

case "$ACTION" in
start)
    /usr/lib/murasaki/bin/ifup $DEVICE
    ;;

stop)
    /usr/lib/murasaki/bin/ifdown $DEVICE
    ;;

restart)
    /sbin/ifconfig $DEVICE down up
    ;;
esac

exit 0
