Skip to content

Fix fact scripts by adding quotes#40

Open
jaakkosipari wants to merge 1 commit intoarildjensen:masterfrom
jaakkosipari:fix-fact-scripts
Open

Fix fact scripts by adding quotes#40
jaakkosipari wants to merge 1 commit intoarildjensen:masterfrom
jaakkosipari:fix-fact-scripts

Conversation

@jaakkosipari
Copy link

At least some of the if statements broke when encountering multipart strings (like multiple files found with a find command line). I originally bumped into this when trying to figure out why fact script 0002 (find files with unknown owner) doesn't work.

Without modifications (and with an alien file around) it acts like this:

[vagrant@client1 ~]$ ls -l
total 1
-rw------- 1    4567 vagrant  0 Jan 14 11:52 my_unowned_file
[vagrant@client1 ~]$ sudo sh /usr/local/sbin/f0002.sh 
/usr/local/sbin/f0002.sh: line 9: [: too many arguments

By adding quotes it starts acting like it should.

…ntering

multipart strings (like multiple files found with a find command line)
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.

1 participant