From 66e46d8ec290737fd74f50eb8c7672d627d9b516 Mon Sep 17 00:00:00 2001 From: Chris Brinker <chris.brinker@gmail.com> Date: Fri, 28 Apr 2017 10:53:07 -0700 Subject: Actually skip warnings when .skip file is present. This change allows the presence of "/var/lib/cloud/instance/warnings/.skip" to actually skip warnings as documented in Z99-cloudinit-warnings.sh. LP: #1691551 --- tools/Z99-cloudinit-warnings.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/Z99-cloudinit-warnings.sh b/tools/Z99-cloudinit-warnings.sh index b237786b..1d413374 100644 --- a/tools/Z99-cloudinit-warnings.sh +++ b/tools/Z99-cloudinit-warnings.sh @@ -4,12 +4,12 @@ # Purpose: show user warnings on login. cloud_init_warnings() { - local skipf="" warning="" idir="/var/lib/cloud/instance" n=0 + local warning="" idir="/var/lib/cloud/instance" n=0 local warndir="$idir/warnings" local ufile="$HOME/.cloud-warnings.skip" sfile="$warndir/.skip" [ -d "$warndir" ] || return 0 [ ! -f "$ufile" ] || return 0 - [ ! -f "$skipf" ] || return 0 + [ ! -f "$sfile" ] || return 0 for warning in "$warndir"/*; do [ -f "$warning" ] || continue -- cgit v1.2.3