From bae89dae0f00062ac60e05a3d30f18f135f8e254 Mon Sep 17 00:00:00 2001 From: Mathias Sass Michno Date: Wed, 6 Oct 2021 13:30:16 +0200 Subject: [PATCH] Add --hostapd-timestamps options to create_ap --- src/scripts/create_ap | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/scripts/create_ap b/src/scripts/create_ap index a2fa05a..5c7e266 100755 --- a/src/scripts/create_ap +++ b/src/scripts/create_ap @@ -46,6 +46,7 @@ usage() { echo " --mac-filter-accept Location of MAC address filter list (defaults to /etc/hostapd/hostapd.accept)" echo " --redirect-to-localhost If -n is set, redirect every web request to localhost (useful for public information networks)" echo " --hostapd-debug With level between 1 and 2, passes arguments -d or -dd to hostapd for debugging." + echo " --hostapd-timestamps Include timestamps in hostapd debug messages." echo " --isolate-clients Disable communication between clients" echo " --ieee80211n Enable IEEE 802.11n (HT)" echo " --ieee80211ac Enable IEEE 802.11ac (VHT)" @@ -1054,7 +1055,7 @@ for ((i=0; i<$#; i++)); do fi done -GETOPT_ARGS=$(getopt -o hc:w:g:de:nm: -l "help","hidden","hostapd-debug:","redirect-to-localhost","mac-filter","mac-filter-accept:","isolate-clients","ieee80211n","ieee80211ac","ht_capab:","vht_capab:","driver:","no-virt","fix-unmanaged","country:","freq-band:","mac:","dhcp-dns:","daemon","pidfile:","logfile:","stop:","list","list-running","list-clients:","version","psk","no-haveged","no-dns","no-dnsmasq","mkconfig:","config:" -n "$PROGNAME" -- "$@") +GETOPT_ARGS=$(getopt -o hc:w:g:de:nm: -l "help","hidden","hostapd-debug:","hostapd-timestamps","redirect-to-localhost","mac-filter","mac-filter-accept:","isolate-clients","ieee80211n","ieee80211ac","ht_capab:","vht_capab:","driver:","no-virt","fix-unmanaged","country:","freq-band:","mac:","dhcp-dns:","daemon","pidfile:","logfile:","stop:","list","list-running","list-clients:","version","psk","no-haveged","no-dns","no-dnsmasq","mkconfig:","config:" -n "$PROGNAME" -- "$@") [[ $? -ne 0 ]] && exit 1 eval set -- "$GETOPT_ARGS" @@ -1229,15 +1230,19 @@ while :; do --hostapd-debug) shift if [ "x$1" = "x1" ]; then - HOSTAPD_DEBUG_ARGS="-d" + HOSTAPD_DEBUG_ARGS+="-d " elif [ "x$1" = "x2" ]; then - HOSTAPD_DEBUG_ARGS="-dd" + HOSTAPD_DEBUG_ARGS+="-dd " else printf "Error: argument for --hostapd-debug expected 1 or 2, got %s\n" "$1" exit 1 fi shift ;; + --hostapd-timestamps) + shift + HOSTAPD_DEBUG_ARGS+="-t " + ;; --mkconfig) shift STORE_CONFIG="$1"