Merge ~chris-brinker/cloud-init:actually-skip-warnings into cloud-init:master

Proposed by Chris Brinker on 2017-04-28
Status: Merged
Approved by: Scott Moser on 2017-05-17
Approved revision: a88ec5b39d297cdd31a9611219c9f65d0cfb9a18
Merged at revision: 66e46d8ec290737fd74f50eb8c7672d627d9b516
Proposed branch: ~chris-brinker/cloud-init:actually-skip-warnings
Merge into: cloud-init:master
Diff against target: 19 lines (+2/-2)
1 file modified
tools/Z99-cloudinit-warnings.sh (+2/-2)
Reviewer Review Type Date Requested Status
Scott Moser 2017-04-28 Approve on 2017-05-17
Server Team CI bot continuous-integration Approve on 2017-04-28
Review via email: mp+323406@code.launchpad.net

Commit message

Actually skip warnings via touch

This change allows the presence of "/var/lib/cloud/instance/warnings/.skip" to actually skip warnings as documented.

Description of the change

This change allows the presence of "/var/lib/cloud/instance/warnings/.skip" to actually skip warnings as documented.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tools/Z99-cloudinit-warnings.sh b/tools/Z99-cloudinit-warnings.sh
2index b237786..1d41337 100644
3--- a/tools/Z99-cloudinit-warnings.sh
4+++ b/tools/Z99-cloudinit-warnings.sh
5@@ -4,12 +4,12 @@
6 # Purpose: show user warnings on login.
7
8 cloud_init_warnings() {
9- local skipf="" warning="" idir="/var/lib/cloud/instance" n=0
10+ local warning="" idir="/var/lib/cloud/instance" n=0
11 local warndir="$idir/warnings"
12 local ufile="$HOME/.cloud-warnings.skip" sfile="$warndir/.skip"
13 [ -d "$warndir" ] || return 0
14 [ ! -f "$ufile" ] || return 0
15- [ ! -f "$skipf" ] || return 0
16+ [ ! -f "$sfile" ] || return 0
17
18 for warning in "$warndir"/*; do
19 [ -f "$warning" ] || continue

Subscribers

People subscribed via source and target branches