Fix up udev zap devices to look like devfs (which asterisk expects).
authorMichael Geddes <openwrt@frog.wheelycreek.net>
Wed, 14 Jan 2009 01:53:07 +0000 (01:53 +0000)
committerMichael Geddes <openwrt@frog.wheelycreek.net>
Wed, 14 Jan 2009 01:53:07 +0000 (01:53 +0000)
contrib/package/asterisk-xip/files/asterisk.init

index 4b17c432701136a529794a5da1d043c323f5100c..b2acd2aa83c00f6ab35aa394f9d9b7ee5765f184 100755 (executable)
@@ -46,9 +46,11 @@ reload_uci() {
 
 start() {
        [ -f $DEFAULT ] && . $DEFAULT
-       case ${ENABLE_ASTERISK:-no} in
+       case ${ENABLE_ASTERISK-no} in
                uci)  start_uci ;;
                yes)
+                       # Handle zappseudo in the wrong place.
+                       [ -e /dev/zappseudo ] && [ ! -d /dev/zap -o ! -e /dev/zap/pseudo ] && mkdir -p /dev/zap && ln -s /dev/zappseudo /dev/zap/pseudo
                        [ -d /var/run ] || mkdir -p /var/run
                        [ -d $DEST/var/log/asterisk ] || mkdir -p $DEST/var/log/asterisk
                        [ -d $DEST/var/spool/asterisk ] || mkdir -p $DEST/var/spool/asterisk