[zaptel-commits] tzafrir: branch 1.4 r2740 - /branches/1.4/zaptel.init

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Mon Jul 16 08:14:06 CDT 2007


Author: tzafrir
Date: Mon Jul 16 08:14:05 2007
New Revision: 2740

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2740
Log:
Simplify hpec_start and remove duplicates.

Modified:
    branches/1.4/zaptel.init

Modified: branches/1.4/zaptel.init
URL: http://svn.digium.com/view/zaptel/branches/1.4/zaptel.init?view=diff&rev=2740&r1=2739&r2=2740
==============================================================================
--- branches/1.4/zaptel.init (original)
+++ branches/1.4/zaptel.init Mon Jul 16 08:14:05 2007
@@ -85,15 +85,10 @@
 
 
 hpec_start() {
-	# check for HPEC licenses
-	for f in /var/lib/digium/licenses/HPEC*.lic; do
-		if [ -f ${f} ]; then
-			haveHPEC=1
-		fi
-	done
-
 	# HPEC license found
-	if [ -z "${haveHPEC}" ]; then return; fi
+	if ! echo /var/lib/digium/licenses/HPEC-*.lic | grep -v '\*' | grep -q .; then
+		return
+	fi
 
 	# zaphpec_enable not installed in /usr/sbin
 	if [ ! -f /usr/sbin/zaphpec_enable ]; then
@@ -200,13 +195,6 @@
 	RETVAL=$?
 
 	[ $RETVAL -eq 0 ] && touch $LOCKFILE
-	
-	# check for HPEC licenses
-	for f in /var/lib/digium/licenses/HPEC*.lic; do
-		if [ -f ${f} ]; then
-			haveHPEC=1
-		fi
-	done
 
 	hpec_start
 	;;




More information about the zaptel-commits mailing list