diff options
author | Chris Brinker <chris.brinker@gmail.com> | 2017-04-28 10:53:07 -0700 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-05-17 16:29:29 -0400 |
commit | 66e46d8ec290737fd74f50eb8c7672d627d9b516 (patch) | |
tree | f59d27636e49dc021ea87493562d8333f2ef54dc | |
parent | a6572d9415e592cbf9821b769bbee9e7fdf029d5 (diff) | |
download | cloud-init-git-66e46d8ec290737fd74f50eb8c7672d627d9b516.tar.gz |
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
-rw-r--r-- | tools/Z99-cloudinit-warnings.sh | 4 |
1 files changed, 2 insertions, 2 deletions
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 |