BBB getting a WiFi access-point into the air

First of all, thank you to the following web-sites that have all been followed in order to get this beast running:
What I have done:

As stated in my previous post I set out to get my BBB industrial to work as a WiFi access-point.

I started to configure the WiFi USB-key in order to connect the BBB to the internet. This makes it easier to install and update the required software. I used a key bought at element14.

Therefore I added the following lines in /etc/network/interfaces

iface wlan0 inet dhcp
wpa-ssid "myNetworkSSID"
wpa-psk "myPassword"

Then I started updating the distribution that was installed by default.

root@beaglebone:~# apt-get update
root@beaglebone:~# apt-get upgrade
root@beaglebone:~# apt-get distro-upgrade

After this I followed along the guides I mentioned above struggeling to get it working for my board, probably due to the slight differences of the industrial version against the normal BBB?

Here are my configuration files for this, it might maybe help somebody:

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet static
address 192.168.42.1
netmask 255.255.255.0

# Ethernet/RNDIS gadget (g_ether)
# Used by: /opt/scripts/boot/autoconfigure_usb0.sh
iface usb0 inet static
    address 192.168.7.2
    netmask 255.255.255.252
    network 192.168.7.0
    gateway 192.168.7.1

/etc/hostapd/hostapd.conf

### Wireless network name ###
interface=wlan0

country_code=FR

ssid=anyTextAsSSID

channel=7

hw_mode=g

# # Static WPA2 key configuration
# #1=wpa1, 2=wpa2, 3=both
wpa=2

wpa_passphrase=AnyPassword

## Key management algorithms ##
wpa_key_mgmt=WPA-PSK
#
## Set cipher suites (encryption algorithms) ##
## TKIP = Temporal Key Integrity Protocol
## CCMP = AES in Counter mode with CBC-MAC
wpa_pairwise=TKIP
#rsn_pairwise=CCMP
#
## Shared Key Authentication ##
auth_algs=1
## Accept all MAC address ###
macaddr_acl=0
#enables/disables broadcasting the ssid
ignore_broadcast_ssid=0
# Needed for Windows clients
eapol_key_index_workaround=0

/etc/dhcp/dhcpd.conf

I had to change the things in colour in order to make it work

# Sample configuration file for ISC dhcpd for Debian
#
#

# The ddns-updates-style parameter controls whether or not the server w$
# attempt to do a DNS update when a lease is confirmed. We default to t$
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

default-lease-time 600;
max-lease-time 7200;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# This is a subnet declaration from the example of Adafruit .
subnet 192.168.42.0 netmask 255.255.255.0 {
         range 192.168.42.10 192.168.42.50;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.42.255;
        option routers 192.168.42.1;
        default-lease-time 600;
        max-lease-time 7200;
        option domain-name "local";
        option domain-name-servers 8.8.8.8, 8.8.4.4;
        pool {
            range 192.168.42.10 192.168.42.50;
        }
}

/etc/default/isc-dhcp-server

# Defaults for isc-dhcp-server initscript
# sourced by /etc/init.d/isc-dhcp-server
# installed at /etc/default/isc-dhcp-server by the maintainer scripts

#
# This is a POSIX shell fragment
#

# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
DHCPD_CONF=/etc/dhcp/dhcpd.conf

# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
#DHCPD_PID=/var/run/dhcpd.pid

# Additional options to start dhcpd with.
#       Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID in$
#OPTIONS=""

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="wlan0"

The dhcp server only worked, when I added a sleep 10 in /etc/init.d/isc-dhcp-server. It seems that the dhcp server doesn’t start as long as “wlan0” isn’t completely initialized. For my BeagleBone waiting 10s worked.

I would however like to learn how to do this properly (let the dhcp server wait until “wlan0” is up and than start the demon).

#!/bin/sh
#
#

### BEGIN INIT INFO
# Provides:          isc-dhcp-server
# Required-Start:    $remote_fs $network $syslog
# Required-Stop:     $remote_fs $network $syslog
# Should-Start:      $local_fs slapd $named
# Should-Stop:       $local_fs slapd
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: DHCP server
# Description:       Dynamic Host Configuration Protocol Server
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

test -f /usr/sbin/dhcpd || exit 0

DHCPD_DEFAULT="${DHCPD_DEFAULT:-/etc/default/isc-dhcp-server}"

# CA 12/2016 try to work arround wlan0 startup issues
sleep 10

# It is not safe to start if we don't have a default configuration...

#this file goes on and on after this ---v