summaryrefslogtreecommitdiff
path: root/xpp/astribank_hook
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-10-21 14:30:32 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-10-21 14:30:32 +0000
commit939ffb7577ce08dfc552ce0c112e9d51fd2b4519 (patch)
treeb109d414522a83530be7999b0aa9d13a61f5c739 /xpp/astribank_hook
parentee453cb6ce6863f1b3f87888bf4572d1f6455cb3 (diff)
Fix XPP_HOTPLUG_DAHDI: logic; end of init.d script
'Hotplug mode' was introduced in r7335. * The logic in the script was broken. - Negative logic is not such a grand idea to start with. * Interactive invocation of init.d ends when expected and not sooner. This change makes waitfor_xpds wait longer. Rather than waiting for all the Astribanks to load, it will now wait until the initialization of dahdi from the Astribanks hook script is run. This allows running e.g.: /etc/init.d/dahdi start; /etc/init.d/asterisk start It also means that 'astribank_is_starting' is actually used as a semaphore and not only as stamp file. As before, those changes have no effect if hotplug mode is not explicitly enabled (setting 'XPP_HOTPLUG_DAHDI=yes' in init.conf). git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@7409 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/astribank_hook')
-rwxr-xr-xxpp/astribank_hook9
1 files changed, 8 insertions, 1 deletions
diff --git a/xpp/astribank_hook b/xpp/astribank_hook
index 8c5bea8..dc55d14 100755
--- a/xpp/astribank_hook
+++ b/xpp/astribank_hook
@@ -29,7 +29,11 @@ fi
export XPPORDER_CONF="$dahdi_conf/xpp_order"
if [ ! -r "$XPPORDER_CONF" ]; then
- echo "Skip($ACTION): No '$XPPORDER_CONF'" | $LOGGER
+ (
+ echo "Skip($ACTION): No '$XPPORDER_CONF'"
+ echo "Removing uneeded startup semaphore"
+ astribank_is_starting -v -r 2>&1
+ ) 2>&1 | $LOGGER
exit 0
fi
export DAHDI_CFG_CMD="dahdi_cfg -c $dahdi_conf/system.conf"
@@ -73,6 +77,9 @@ start_dahdi() {
if [ -x "$dir/twinstar_hook" ]; then
"$dir/twinstar_hook"
fi
+ # Finished astribanks
+ echo "Removing semaphore"
+ astribank_is_starting -v -r
}
case "$ACTION" in