From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 12 22:20:06 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45E5B1065693 for ; Tue, 12 Oct 2010 22:20:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 07DC98FC18 for ; Tue, 12 Oct 2010 22:20:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o9CMK5Bj066930 for ; Tue, 12 Oct 2010 22:20:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o9CMK5KE066929; Tue, 12 Oct 2010 22:20:05 GMT (envelope-from gnats) Resent-Date: Tue, 12 Oct 2010 22:20:05 GMT Resent-Message-Id: <201010122220.o9CMK5KE066929@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, John Hixson Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD1B4106566C for ; Tue, 12 Oct 2010 22:10:49 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id A0AE28FC08 for ; Tue, 12 Oct 2010 22:10:49 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CMAnnU012780 for ; Tue, 12 Oct 2010 22:10:49 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o9CMAn7g012757; Tue, 12 Oct 2010 22:10:49 GMT (envelope-from nobody) Message-Id: <201010122210.o9CMAn7g012757@www.freebsd.org> Date: Tue, 12 Oct 2010 22:10:49 GMT From: John Hixson To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/151416: pc-sysinstall patch that fixes component listing if components don't exist X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 22:20:06 -0000 >Number: 151416 >Category: bin >Synopsis: pc-sysinstall patch that fixes component listing if components don't exist >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Oct 12 22:20:05 UTC 2010 >Closed-Date: >Last-Modified: >Originator: John Hixson >Release: 9.0-CURRENT >Organization: iXsystems >Environment: FreeBSD thinkbsd 9.0-CURRENT FreeBSD 9.0-CURRENT #6: Sat Sep 25 05:21:08 PDT 2010 john@thinkbsd:/usr/obj/usr/src/sys/THINKBSD amd64 >Description: This patch will only list components if the directory exists. The directory exist on PC-BSD but not FreeBSD, so an extra check is made. >How-To-Repeat: >Fix: Patch attached with submission follows: diff -urN usr.sbin/pc-sysinstall.orig/backend-query/list-components.sh usr.sbin/pc-sysinstall/backend-query/list-components.sh --- usr.sbin/pc-sysinstall.orig/backend-query/list-components.sh 2010-10-12 14:53:43.000000000 -0700 +++ usr.sbin/pc-sysinstall/backend-query/list-components.sh 2010-10-12 15:06:23.000000000 -0700 @@ -32,23 +32,24 @@ echo "Available Components:" -cd ${COMPDIR} -for i in `ls -d *` -do - if [ -e "${i}/component.cfg" -a -e "${i}/install.sh" -a -e "${i}/distfiles" ] - then - NAME="`grep 'name:' ${i}/component.cfg | cut -d ':' -f 2`" - DESC="`grep 'description:' ${i}/component.cfg | cut -d ':' -f 2`" - TYPE="`grep 'type:' ${i}/component.cfg | cut -d ':' -f 2`" - echo " " - echo "name: ${i}" - echo "desc:${DESC}" - echo "type:${TYPE}" - if [ -e "${i}/component.png" ] +if [ -d "${COMPDIR}" ] +then + cd ${COMPDIR} + for i in `ls -d *` + do + if [ -e "${i}/component.cfg" -a -e "${i}/install.sh" -a -e "${i}/distfiles" ] then - echo "icon: ${COMPDIR}/${i}/component.png" + NAME="`grep 'name:' ${i}/component.cfg | cut -d ':' -f 2`" + DESC="`grep 'description:' ${i}/component.cfg | cut -d ':' -f 2`" + TYPE="`grep 'type:' ${i}/component.cfg | cut -d ':' -f 2`" + echo " " + echo "name: ${i}" + echo "desc:${DESC}" + echo "type:${TYPE}" + if [ -e "${i}/component.png" ] + then + echo "icon: ${COMPDIR}/${i}/component.png" + fi fi - fi - -done - + done +fi >Release-Note: >Audit-Trail: >Unformatted: