bug script: Check for unreadable /e/n/interfaces files

This commit is contained in:
Ben Hutchings
2019-08-18 14:26:55 +01:00
parent 5fd63090c9
commit 57ce41c618
2 changed files with 6 additions and 0 deletions

1
debian/changelog vendored
View File

@@ -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 <carnil@debian.org> Sun, 11 Aug 2019 14:14:00 +0200

View File

@@ -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); }