Date: Mon, 28 Jan 2002 18:53:20 -0500 (EST) From: The Lumpy One <lumpy@the.whole.net> To: FreeBSD-gnats-submit@freebsd.org Subject: conf/34392: rc.network patch to allow ifconfig aliases to change without renumbering them all Message-ID: <200201282353.g0SNrKC07661@the.whole.net>
next in thread | raw e-mail | index | archive | help
>Number: 34392
>Category: conf
>Synopsis: rc.network patch to allow ifconfig aliases to change without renumbering them all
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 28 16:00:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: The Lumpy One
>Release: FreeBSD 4.3-STABLE i386
>Organization:
The Whole Net
>Environment:
System: FreeBSD the.whole.net 4.3-STABLE FreeBSD 4.3-STABLE #0: Thu Jul 26 00:13:32 EDT 2001 root@the.whole.net:/usr/obj/usr/src/sys/THE-20010726 i386
>Description:
It seems silly that you have to renumber the ifconfig aliases in
/etc/rc.conf when you remove one -- because they are number based
and count up sequentially.
>How-To-Repeat:
The manpage for rc.conf describes this functionality and the
script chunk replaced by this patch will clearly function this
way.
>Fix:
225,235c225,228
< alias=0
< while : ; do
< eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
< if [ -n "${ifconfig_args}" ]; then
< ifconfig ${ifn} ${ifconfig_args} alias
< eval showstat_$ifn=1
< alias=$((${alias} + 1))
< else
< break;
< fi
< done
---
> for alias in `set|awk -F= '(/^ifconfig_'${ifn}'_alias/){print $2};'`; do
> eval showstat_$ifn=1
> ifconfig ${ifn} ${x} alias
> done
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201282353.g0SNrKC07661>
