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


1.2
date	2002.07.26.07.29.06;	author jdolecek;	state Exp;
branches;
next	1.1;

1.1
date	2001.04.25.03.43.31;	author garbled;	state Exp;
branches;
next	;


desc
@@


1.2
log
@make sure at least one host is selected before changing /etc/hosts
Fixes bin/15713 by Tracy Di Marco White.
@
text
@#!/bin/sh
# $NetBSD: script,v 1.1 2001/04/25 03:43:31 garbled Exp $

if [ "$1" = "" ]; then
	echo "No host selected"
	exit 0
fi

DATA=`echo $1 | sed -e 's@@ @@\[^A-Za-z0-9_/\\.-\]\*@@g'`
LIST=`echo $DATA | sed -e 's@@,@@.*//" | sed -e "s/^@@g'`
LIST=`echo 'sed -e "s/^'$LIST'.*//"'`
IFS=" "
HOSTS=`cat /etc/hosts`
echo $HOSTS | eval "$LIST" >/etc/hosts
if [ "$?" = "0" ]; then
	echo "Deleted all selected hosts from /etc/hosts"
else
	echo "Failed to delete hosts"
fi
@


1.1
log
@Whew.  Add an entire networking configuration tree for sushi.  This gives
sushi the ability to do the following tasks:
Edit /etc/exports
Edit /etc/hosts
Change the hostname
Modify NIC configuration
Change the default route
Setup YP/NIS.
@
text
@d2 6
a7 1
# $NetBSD$
@

