Merge ~smoser/cloud-init:bug/ds-identify-reset-set-f into cloud-init:master

Proposed by Scott Moser
Status: Merged
Merged at revision: 2e879da890a4287dd52eab17938d227da7af253a
Proposed branch: ~smoser/cloud-init:bug/ds-identify-reset-set-f
Merge into: cloud-init:master
Diff against target: 13 lines (+1/-1)
1 file modified
tools/ds-identify (+1/-1)
Reviewer Review Type Date Requested Status
Ryan Harper Approve
Review via email: mp+320656@code.launchpad.net

Commit message

ds-identify: fix bug where filename expansion was left on.

The script is written to have the protection of disabling filename
expansion (set -f) and explicitly enabling expansion when needed.
However, the check_config function failed to disable it after enabling.

To post a comment you must log in.
Revision history for this message
Ryan Harper (raharper) wrote :

I'll take this moment to remind ourselves that we need some unittest (and integration tests) for ds-identify.

review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tools/ds-identify b/tools/ds-identify
2index e138d78..6f1e983 100755
3--- a/tools/ds-identify
4+++ b/tools/ds-identify
5@@ -473,7 +473,7 @@ check_config() {
6 files="$*"
7 fi
8 shift
9- set +f; set -- $files; set +f;
10+ set +f; set -- $files; set -f;
11 if [ "$1" = "$files" -a ! -f "$1" ]; then
12 return 1
13 fi

Subscribers

People subscribed via source and target branches