andrewm@309: #! /bin/sh
andrewm@309: # /etc/init.d/bela
andrewm@309: #
andrewm@309: 
andrewm@309: # Some things that run always
andrewm@309: # ...nothing to do here
andrewm@309: 
andrewm@309: # Carry out specific functions when asked to by the system
andrewm@309: case "$1" in
andrewm@309:   start)
andrewm@309:     echo "Adding Bela PRU Overlay..."
andrewm@309:     echo BB-BONE-PRU-BELA > /sys/devices/bone_capemgr.9/slots
andrewm@309:     echo "Adding Bela Audio Cape Overlay..."
andrewm@309:     echo BB-BONE-BAREAUDI-02 > /sys/devices/bone_capemgr.9/slots
andrewm@309:     cd /root
andrewm@309:     sh BeagleRT_startup.sh
andrewm@309:     sh BeagleRT_node.sh
andrewm@309:     ;;
andrewm@309:   stop)
andrewm@309:     pkill BeagleRT
andrewm@309:     ;;
andrewm@309:   *)
andrewm@309:     echo "Usage: /etc/init.d/bela {start|stop}"
andrewm@309:     exit 1
andrewm@309:     ;;
andrewm@309: esac
andrewm@309: 
andrewm@309: exit 0