From owner-freebsd-bugs Mon Jan 28 16: 0:13 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B588A37B419 for ; Mon, 28 Jan 2002 16:00:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0T000g71014; Mon, 28 Jan 2002 16:00:00 -0800 (PST) (envelope-from gnats) Received: from the.whole.net (the.whole.net [206.26.15.65]) by hub.freebsd.org (Postfix) with ESMTP id 6A18237B402 for ; Mon, 28 Jan 2002 15:53:21 -0800 (PST) Received: (from lumpy@localhost) by the.whole.net (8.11.6/8.11.0) id g0SNrKC07661; Mon, 28 Jan 2002 18:53:20 -0500 (EST) Message-Id: <200201282353.g0SNrKC07661@the.whole.net> Date: Mon, 28 Jan 2002 18:53:20 -0500 (EST) From: The Lumpy One Reply-To: The Lumpy One To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: conf/34392: rc.network patch to allow ifconfig aliases to change without renumbering them all Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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