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

Fix erroneous \n printed in uninstaller #8446

Merged
merged 2 commits into from Mar 25, 2020
Merged

Fix erroneous \n printed in uninstaller #8446

merged 2 commits into from Mar 25, 2020

Conversation

prologic
Copy link
Contributor

@prologic prologic commented Mar 19, 2020

Summary

As per title.

See #8422

Component Name
  • area/packaging
Test Plan

Beofre:

Deleting netdata user from docker group ...
[/root]# gpasswd -d netdata docker \nRemoving user netdata from group docker
 OK  gpasswd -d netdata docker

After:

Deleting netdata user from docker group ...
[/root]# gpasswd -d netdata docker
Removing user netdata from group docker
 OK
Additional Information

When you do printf "%s" "${foo}" don't do printf "%s" "${foo}\n" it
doesn't do what you expect, it treats the \n as escapced raw text in the
subsitution.

@squash-labs
Copy link

squash-labs bot commented Mar 19, 2020

Manage this branch in Squash

Test this branch here: https://prologicfix-newlines-uninstall-skm1p.squash.io

@prologic prologic self-assigned this Mar 19, 2020
@prologic prologic requested a review from ilyam8 March 19, 2020 23:30
@github-actions github-actions bot added the area/packaging Packaging and operating systems support label Mar 19, 2020
knatsakis
knatsakis previously approved these changes Mar 20, 2020
@thiagoftsm
Copy link
Contributor

@prologic, please, take a look in shellcheck failure report.

Ferroin
Ferroin previously approved these changes Mar 20, 2020
thiagoftsm
thiagoftsm previously approved these changes Mar 20, 2020
@prologic prologic dismissed stale reviews from thiagoftsm, Ferroin, and knatsakis via dc46212 March 22, 2020 22:59
@prologic
Copy link
Contributor Author

@prologic, please, take a look in shellcheck failure report.

Done Thank you!

$ shellcheck packaging/installer/netdata-uninstaller.sh | wc -l
0

thiagoftsm
thiagoftsm previously approved these changes Mar 23, 2020
Copy link
Contributor

@thiagoftsm thiagoftsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested on CentOS 7 and FreeBSD 12.1, and I verified that the problem was fixed.

@thiagoftsm
Copy link
Contributor

@prologic , please, do a rebase here.

@prologic prologic merged commit 7cdb949 into netdata:master Mar 25, 2020
@prologic prologic deleted the fix_newlines_uninstaller branch March 25, 2020 23:44
Saruspete pushed a commit to Saruspete/netdata that referenced this pull request May 21, 2020
* Fix erroneous \n printed in uninstaller

* Fixed shellcheck errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging Packaging and operating systems support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants