From 244185f0058d6d0175de21e0f0264ab95c980086 Mon Sep 17 00:00:00 2001 From: luigi Date: Thu, 27 Sep 2001 16:47:45 +0000 Subject: Enable the use of wildcards in the #ethertable section of /etc/hosts to map MAC addresses to hostnames. Main use is to get addresses for vmware interfaces. --- release/picobsd/floppy.tree/etc/rc.conf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'release') diff --git a/release/picobsd/floppy.tree/etc/rc.conf b/release/picobsd/floppy.tree/etc/rc.conf index d597aa8..1e854f6 100644 --- a/release/picobsd/floppy.tree/etc/rc.conf +++ b/release/picobsd/floppy.tree/etc/rc.conf @@ -47,10 +47,13 @@ hostname="" while read a b c ; do if [ "$a" = "#ethertable" ] ; then hostname="." - elif [ "X$hostname" = "X." -a "X$a" = "X#" -a "X$b" = "X$main_ether" ] - then - hostname=$c - break + elif [ "X$hostname" = "X." -a "X$a" = "X#" ] ; then + case X${main_ether} in + X${b} ) # so we can use wildcards + hostname=$c + break + ;; + esac fi done < /etc/hosts if [ "X$hostname" = "X" -o "X$hostname" = "X." ] ; then -- cgit v1.1