Merge pull request #1301 from pi-hole/ln-fallback
Configure FTL's MACVENDORDB setting to "/macvendor.db" on startup
This commit is contained in:
commit
ad6b8a6f0e
|
@ -107,11 +107,11 @@ ensure_basic_configuration() {
|
|||
cp -f "${setupVars}" "${setupVars}.update.bak"
|
||||
fi
|
||||
|
||||
# Remove any existing macvendor.db and replace it with a symblink to the one moved to the root directory (see install.sh)
|
||||
if [[ -f "/etc/pihole/macvendor.db" ]]; then
|
||||
rm /etc/pihole/macvendor.db
|
||||
# If FTLCONF_MACVENDORDB is not set
|
||||
if [[ -z "${FTLCONF_MACVENDORDB:-}" ]]; then
|
||||
# User is not passing in a custom location - so force FTL to use the file we moved to / during the build
|
||||
changeFTLsetting "MACVENDORDB" "/macvendor.db"
|
||||
fi
|
||||
ln -s /macvendor.db /etc/pihole/macvendor.db
|
||||
|
||||
# When fresh empty directory volumes are used then we need to create this file
|
||||
if [ ! -f /etc/dnsmasq.d/01-pihole.conf ] ; then
|
||||
|
|
|
@ -86,11 +86,11 @@ sed -i $'s/)\s*uninstallFunc/) unsupportedFunc/g' /usr/local/bin/pihole
|
|||
# pihole -r / pihole reconfigure
|
||||
sed -i $'s/)\s*reconfigurePiholeFunc/) unsupportedFunc/g' /usr/local/bin/pihole
|
||||
|
||||
# Move macvendor.db to root dir and symlink it back into /etc/pihole. See https://github.com/pi-hole/docker-pi-hole/issues/1137
|
||||
# Move macvendor.db to root dir See https://github.com/pi-hole/docker-pi-hole/issues/1137
|
||||
# During startup we will change FTL's configuration to point to this file instead of /etc/pihole/macvendor.db
|
||||
# If user goes on to bind monunt this directory to their host, then we can easily ensure macvendor.db is the latest
|
||||
# (it is otherwise only updated when FTL is updated, which doesn't happen as part of the normal course of running this image)
|
||||
mv /etc/pihole/macvendor.db /macvendor.db
|
||||
ln -s /macvendor.db /etc/pihole/macvendor.db
|
||||
|
||||
if [ ! -f /.piholeFirstBoot ]; then
|
||||
touch /.piholeFirstBoot
|
||||
|
|
Loading…
Reference in New Issue