Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Oct 2010 22:10:49 GMT
From:      John Hixson <john@ixsystems.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/151416: pc-sysinstall patch that fixes component listing if components don't exist
Message-ID:  <201010122210.o9CMAn7g012757@www.freebsd.org>
Resent-Message-ID: <201010122220.o9CMK5KE066929@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010122210.o9CMAn7g012757>