Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove superfluous quotes in parameter expansion #502

Merged
merged 1 commit into from Dec 13, 2018
Merged

remove superfluous quotes in parameter expansion #502

merged 1 commit into from Dec 13, 2018

Conversation

nolange
Copy link

@nolange nolange commented Dec 12, 2018

as this breaks busybox hush shell.
offending functions can be found with
grep -r '${[^}]"[^}]}'

as this breaks busybox hush shell.
offending functions can be found with
grep -r '${[^}]*"[^}]*}'
@centos-ci
Copy link
Collaborator

Can one of the admins verify this patch?

@haraldh haraldh merged commit f9c96cf into dracutdevs:master Dec 13, 2018
@diabonas
Copy link
Contributor

Quotes in patterns are actually required (according to POSIX) if the variable contains special pattern characters like * or \, try e.g.

i='a\c'; j='\'; echo "${i%$j*}"

vs.

i='a\c'; j='\'; echo "${i%"$j"*}"

Furthermore I couldn't find any issues with using quotes in parameter expansions with a recent busybox hush build. Since this actually breaks unlocking encrypted partitions with shells like bash, dash and ash, I suggest reintroducing variable quoting at least in patterns, see #794.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants