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
diff --git a/tools/ds-identify b/tools/ds-identify
index e138d78..6f1e983 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -473,7 +473,7 @@ check_config() {
473 files="$*"473 files="$*"
474 fi474 fi
475 shift475 shift
476 set +f; set -- $files; set +f;476 set +f; set -- $files; set -f;
477 if [ "$1" = "$files" -a ! -f "$1" ]; then477 if [ "$1" = "$files" -a ! -f "$1" ]; then
478 return 1478 return 1
479 fi479 fi

Subscribers

People subscribed via source and target branches