[svn-commits] russell: branch 1.4 r2348 - in /branches/1.4: ./ README.hpec zaptel.init

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Mar 29 09:06:28 MST 2007


Author: russell
Date: Thu Mar 29 11:06:28 2007
New Revision: 2348

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2348
Log:
Merged revisions 2347 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.2

........
r2347 | russell | 2007-03-29 11:05:32 -0500 (Thu, 29 Mar 2007) | 3 lines

Add a README for HPEC, and add support for HPEC in the init script.
(issue #9413, chozian)

........

Added:
    branches/1.4/README.hpec
      - copied unchanged from r2347, branches/1.2/README.hpec
Modified:
    branches/1.4/   (props changed)
    branches/1.4/zaptel.init

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/zaptel.init
URL: http://svn.digium.com/view/zaptel/branches/1.4/zaptel.init?view=diff&rev=2348&r1=2347&r2=2348
==============================================================================
--- branches/1.4/zaptel.init (original)
+++ branches/1.4/zaptel.init Thu Mar 29 11:06:28 2007
@@ -154,6 +154,7 @@
 		eval localARGS="\$${x}_ARGS"
 		if modprobe ${x} ${ARGS} ${localARGS} >& /dev/null; then
 			echo -n " $x"
+			echo "."
 		fi
 	done
 	sleep 3 # TODO: remove it
@@ -176,6 +177,39 @@
 	RETVAL=$?
 
 	[ $RETVAL -eq 0 ] && touch $LOCKFILE
+	
+	# HPEC license found
+	if [ x`find /var/lib/digium/licenses/ -maxdepth 1 -name HPEC-\*.lic -printf yes -quit` = xyes ]; then
+		# zaphpec_enable not installed in /usr/sbin
+		if [ ! -f /usr/sbin/zaphpec_enable ]; then
+			echo -n "Running zaphpec_enable: Failed"
+			echo -n "."
+			echo "  The zaphpec_enable binary is not installed in /usr/sbin."
+		else
+			# zaphpec_enable not set executable
+			if [ ! -x /usr/sbin/zaphpec_enable ]; then
+				echo -n "Running zaphpec_enable: Failed"
+				echo -n "."
+				echo "  /usr/sbin/zaphpec_enable is not set executable."
+			else
+				# zaphpec_enable properly installed
+				if [ $system = debian ]; then
+					echo -n "Running zaphpec_enable: "
+					/usr/sbin/zaphpec_enable >& /dev/null
+				elif [ $system = redhat ]; then
+					action "Running zaphpec_enable: " /usr/sbin/zaphpec_enable
+				fi
+				if [ $? = 0 ]; then
+					echo -n "done"
+					echo "."
+				else
+					echo -n "Failed"
+					echo -n "."
+					echo "  This can be caused if you had already ran zaphpec_enable, or if your HPEC license is no longer valid."
+				fi
+			fi
+		fi
+	fi
 	;;
   stop)
 	# Unload drivers



More information about the svn-commits mailing list