From 19232d7ef5ec7d43ac4e6a5739d62c142d77d640 Mon Sep 17 00:00:00 2001 From: Johannes Kulik Date: Thu, 22 Jun 2017 11:19:08 +0200 Subject: [PATCH] Let unbound find rc.local on Debian stretch in DIB Building an image for stretch results in the unbound configuration script throwing an error, that it cannot know where to find rc.local. This happens, because the file is missing in the installed image. The script now checks for /etc/debian_version instead of erroring out. This file is available on any debian system. If there's no rc.local and /etc/debian_version is available, rc.local can just be created with the appropriate content, /etc/rc.local is executed on Debian. Change-Id: If98f7ef1657b4f538a4f79ba116c8cff991aefc7 --- nodepool/elements/nodepool-base/finalise.d/89-unbound | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodepool/elements/nodepool-base/finalise.d/89-unbound b/nodepool/elements/nodepool-base/finalise.d/89-unbound index ee90b5f782..003f2ed34c 100755 --- a/nodepool/elements/nodepool-base/finalise.d/89-unbound +++ b/nodepool/elements/nodepool-base/finalise.d/89-unbound @@ -64,7 +64,7 @@ chmod 0644 /var/log/unbound.log # # On Redhat systems, systemd's rc-local service looks for an # executable /etc/rc.d/rc.local file to run. On Debian/Ubuntu, the -# eqivalent file is /etc/rc.local. +# eqivalent file is /etc/rc.local, which is missing on Debian stretch. # # Centos' systemd package symlinks /etc/rc.local to /etc/rc.d/rc.local # correctly. Fedora, however, does not come with an rc.local file at @@ -76,7 +76,7 @@ chmod 0644 /var/log/unbound.log # details on all this. As at 2016-10-18 is unresolved. # # [1] https://bugzilla.redhat.com/show_bug.cgi?id=1386052 -if [[ ! -e /etc/rc.local ]]; then +if [[ ! -e /etc/rc.local ]] && [[ ! -e /etc/debian_version ]]; then if [[ ! -d /etc/rc.d ]]; then echo "No rc.local and no rc.d directory! See comments in 89-unbound" exit 1