[PC-BSD Commits] r18070 - pcbsd/current/src-sh/pbi-manager

svn at pcbsd.org svn at pcbsd.org
Wed Aug 1 10:29:26 PDT 2012


Author: kris
Date: 2012-08-01 17:29:26 +0000 (Wed, 01 Aug 2012)
New Revision: 18070

Modified:
   pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:

Simplify code to reset priorities


Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-08-01 17:26:58 UTC (rev 18069)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-08-01 17:29:26 UTC (rev 18070)
@@ -5479,6 +5479,11 @@
 		_cd=$(dirname $pbi | sed 's|./||')
 		PBI_CONFDIR="$_cd"
 
+  	        # Unset the priority if set to 00 / 0
+	        if [ "${PBI_AB_PRIORITY}" = "00" -o "$PBI_AB_PRIORITY" = "0" ] ; then 
+		   	unset PBI_AB_PRIORITY
+     	        fi
+
 		# Make sure PBI_MAKEPORT is set
 		if [ -z "${PBI_MAKEPORT}" ] ; then
 			PBI_MAKEPORT=`echo $pbi | sed 's|./||'`
@@ -5513,21 +5518,12 @@
 		     if [ -z "$PBI_AB_PRIORITY" ] ; then 
                        CUR_PRIORITY_PBI="$internal_ab_priority"
 	             else
-		       if [ "${PBI_AB_PRIORITY}" = "00" -o "$PBI_AB_PRIORITY" = "0" ]; then 
-                         CUR_PRIORITY_PBI="$internal_ab_priority"
-		       else
-                         CUR_PRIORITY_PBI=`expr $PBI_AB_PRIORITY + 10`
-		       fi
+                       CUR_PRIORITY_PBI=`expr $PBI_AB_PRIORITY + 10`
                      fi
 		     echo "Setting higher priority target: ${pbi} - Priority: ${CUR_PRIORITY_PBI}"
                      continue
                    fi
 
-		   # Unset the 00
-		   if [ "${PBI_AB_PRIORITY}" = "00" -o "$PBI_AB_PRIORITY" = "0" ] ; then 
-		      unset PBI_AB_PRIORITY
-		   fi
-
 		   # Bump up the supplied AB priority
 		   if [ -n "${PBI_AB_PRIORITY}" ] ; then 
                       internal_ab_priority=`expr $PBI_AB_PRIORITY + 10`



More information about the Commits mailing list