Replace instead of append network configs.

Now the resulting configuration is cleaner.
pull/345/head
German Ferrero 2019-11-14 13:23:59 -03:00
parent e1a3a0ae38
commit 47c708093c
1 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,10 @@
#!/bin/bash -e
# Setup an static ip to wlan0
cat files/dhcpcd.conf >> ${ROOTFS_DIR}/etc/dhcpcd.conf
install -v files/dhcpcd.conf ${ROOTFS_DIR}/etc/dhcpcd.conf
# Setup dhcp server for rpi to serve clients
cat files/dnsmasq.conf >> ${ROOTFS_DIR}/etc/dnsmasq.conf
install -v files/dnsmasq.conf ${ROOTFS_DIR}/etc/dnsmasq.conf
# Setup access point in hostapd/hostapd.conf
cat files/hostapd.conf >> ${ROOTFS_DIR}/etc/hostapd/hostapd.conf
install -v files/hostapd.conf ${ROOTFS_DIR}/etc/hostapd/hostapd.conf
# Point default/hostapd conf to hostapd/hostapd.conf
sed -i "s@#DAEMON_CONF=\"\"@DAEMON_CONF=\"/etc/hostapd/hostapd.conf\"@" "${ROOTFS_DIR}/etc/default/hostapd"