diff options
author | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-03-29 16:06:28 +0000 |
---|---|---|
committer | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-03-29 16:06:28 +0000 |
commit | 952afa1ec2b176eaefc00a84927c6a7a7c3b34a3 (patch) | |
tree | de103bd472233c3950c4001b5240c75288f9fc06 /zaptel.init | |
parent | d44e9181f03e3d3bbf7d7fb326f98408397e79da (diff) |
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)
........
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@2348 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.init')
-rw-r--r-- | zaptel.init | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/zaptel.init b/zaptel.init index c8bfad1..b28c748 100644 --- a/zaptel.init +++ b/zaptel.init @@ -154,6 +154,7 @@ case "$1" in 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 @@ case "$1" in 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 |