From 57ce41c61826519c663dfc24342829109563ea69 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 18 Aug 2019 14:26:55 +0100 Subject: [PATCH] bug script: Check for unreadable /e/n/interfaces files --- debian/changelog | 1 + debian/templates/image.bug/include-network | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index ae7dd025ab35..92a83a42f2cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -191,6 +191,7 @@ linux (5.2.9-1) UNRELEASED; urgency=medium * ptp: Change CAVIUM_PTP from built-in to modular (Closes: #934848) * bug script: Check whether /e/n/interfaces exists (Closes: #934824) * bug script: Include network configuration from /e/n/interfaces.d + * bug script: Check for unreadable /e/n/interfaces files -- Salvatore Bonaccorso Sun, 11 Aug 2019 14:14:00 +0200 diff --git a/debian/templates/image.bug/include-network b/debian/templates/image.bug/include-network index 97675dceecc9..89d9cb9de4b0 100644 --- a/debian/templates/image.bug/include-network +++ b/debian/templates/image.bug/include-network @@ -21,6 +21,11 @@ _add_etc_network_interfaces() { echo '** Network interface configuration:' >&3 while read file; do + if ! [ -r "$file" ]; then + echo "*** $file: unreadable" >&3 + echo >&3 + continue + fi echo "*** $file:" >&3 # Hide passwords/keys awk '$1 ~ /key|pass|^wpa-(anonymous|identity|phase|pin|private|psk)/ { gsub(".", "*", $2); }