Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/sushi/network/hosts/delhost make sure at least one hos...



details:   https://anonhg.NetBSD.org/src/rev/d430ca5f352d
branches:  trunk
changeset: 534442:d430ca5f352d
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Fri Jul 26 07:29:06 2002 +0000

description:
make sure at least one host is selected before changing /etc/hosts
Fixes bin/15713 by Tracy Di Marco White.

diffstat:

 share/sushi/network/hosts/delhost/script |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r bb5398a665d0 -r d430ca5f352d share/sushi/network/hosts/delhost/script
--- a/share/sushi/network/hosts/delhost/script  Fri Jul 26 06:16:32 2002 +0000
+++ b/share/sushi/network/hosts/delhost/script  Fri Jul 26 07:29:06 2002 +0000
@@ -1,5 +1,10 @@
 #!/bin/sh
-# $NetBSD: script,v 1.1 2001/04/25 03:43:31 garbled Exp $
+# $NetBSD: script,v 1.2 2002/07/26 07:29:06 jdolecek 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'`



Home | Main Index | Thread Index | Old Index