diff options
author | Michael Geddes <openwrt@frog.wheelycreek.net> | 2009-01-14 01:38:28 +0000 |
---|---|---|
committer | Michael Geddes <openwrt@frog.wheelycreek.net> | 2009-01-14 01:38:28 +0000 |
commit | 642032dfe89895b3597903102729f5658a86382f (patch) | |
tree | 4e3e53a7df0bb44ca9b7d970deed03d17fe01695 /contrib/package/asterisk-xip/files/uci/asteriskuci | |
parent | 459f46af9ca0dc86077712c3ef0352ca003991d9 (diff) |
Make udev ZAP devices look like devfs devices.
Diffstat (limited to 'contrib/package/asterisk-xip/files/uci/asteriskuci')
-rwxr-xr-x | contrib/package/asterisk-xip/files/uci/asteriskuci | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/package/asterisk-xip/files/uci/asteriskuci b/contrib/package/asterisk-xip/files/uci/asteriskuci index 1fd8f99b9d..b948692d64 100755 --- a/contrib/package/asterisk-xip/files/uci/asteriskuci +++ b/contrib/package/asterisk-xip/files/uci/asteriskuci @@ -293,6 +293,7 @@ reload_asterisk() { ( sleep 5; reboot_hardware ) & fi } + startup_asterisk() { DEST="${1%/}" DEFAULT=$DEST/etc/default/asterisk @@ -302,6 +303,7 @@ startup_asterisk() { [ -d ${asterisk_spooldir} ] || mkdir -p ${asterisk_spooldir} [ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk [ -h $DEST/usr/lib/asterisk/astdb ] || ln -sf /var/spool/asterisk/astdb $DEST/usr/lib/asterisk/astdb + [ -e /dev/zappseudo ] && [ ! -d /dev/zap -o ! -e /dev/zap/pseudo ] && mkdir -p /dev/zap && ln -s /dev/zappseudo /dev/zap/pseudo $DEST/usr/sbin/asterisk -C /tmp/asterisk/asterisk.conf $UCIOPTIONS -f 2>&1 > ${asterisk_logdir}/asterisk_proc & # Wait a bit then reboot the hardware @@ -353,6 +355,8 @@ reload_uci_asterisk() { DEFAULT=$DEST/etc/default/asterisk if [ -r /var/run/asterisk.ctl ] ; then + + [ -e /dev/zappseudo ] && [ ! -d /dev/zap -o ! -e /dev/zap/pseudo ] && mkdir -p /dev/zap && ln -s /dev/zappseudo /dev/zap/pseudo if setup_asterisk "$DEST" ; then # Selective reload modules. reload_asterisk |