From fae70a00527b40ef5d14de03cf73e5bef4c1ba2f Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 10 Apr 2017 16:12:45 +0200 Subject: [PATCH] Add hostapd.conf --- change_network_gateway.sh | 11 +++++++++++ copy_gateway-config.sh | 4 ++++ remote-copy_gateway-config.sh | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/change_network_gateway.sh b/change_network_gateway.sh index e0e1cc6..22a9419 100755 --- a/change_network_gateway.sh +++ b/change_network_gateway.sh @@ -762,6 +762,17 @@ if [ -f ${base_dir}/${network}/radvd.conf.${network} ]; then fi fi +if [ -f ${base_dir}/${network}/hostapd.conf.${network} ]; then + echo -en "\tConfigure hostapd (integrated Accesspoint).." + cp -a ${base_dir}/${network}/hostapd.conf.${network} /etc/hostapd/hostapd.conf > $logfile 2>&1 + if [ "$?" != "0" ]; then + echo_FAILED + error $(cat $logfile) + else + echo_OK + fi +fi + if $_add_support_if ; then if ! grep -e "eth1:rescue " /etc/network/interfaces > /dev/null ; then diff --git a/copy_gateway-config.sh b/copy_gateway-config.sh index e2cadfa..4f79e92 100755 --- a/copy_gateway-config.sh +++ b/copy_gateway-config.sh @@ -269,6 +269,7 @@ fi # - /etc/aiccu.conf # - /etc/default/aiccu # - /etc/radvd.conf +# - /etc/hostapd/hostapd.conf # - if [ -f "${filesystem_prefix}/etc/rc.local" ]; then cp ${filesystem_prefix}/etc/rc.local ${homedir_user}/${_dir}/rc.local.${_network} @@ -288,6 +289,9 @@ fi if [ -f "${filesystem_prefix}/etc/radvd.conf" ]; then cp ${filesystem_prefix}/etc/radvd.conf ${homedir_user}/${_dir}/radvd.conf.${_network} fi +if [ -f "${filesystem_prefix}/etc/hostapd/hostapd.conf" ]; then + cp ${filesystem_prefix}/etc/hostapd/hostapd.conf ${homedir_user}/${_dir}/hostapd.conf.${_network} +fi chown ${user}:${user} ${homedir_user}/${_dir} chown ${user}:${user} ${homedir_user}/${_dir}/*.${_network} diff --git a/remote-copy_gateway-config.sh b/remote-copy_gateway-config.sh index c0c6c7b..359b08f 100755 --- a/remote-copy_gateway-config.sh +++ b/remote-copy_gateway-config.sh @@ -168,7 +168,8 @@ manage_files $files files="hostname.${_network} hosts.${_network} interfaces.${_network} - resolv.conf.${_network}" + resolv.conf.${_network} + hostapd.conf.${_network}" manage_files $files