1 of 1 people found this helpful
Not the most elegant solution, but i've solved your same problem by checking resolv.conf as plain file and using "contains" rule statement. I'm curious about a "correct" solution
and that was the easy one: try the same on windows machine, with dns settings buried deep inside the registry.
I also found a workaround, by using a simple script, but it’s definitely not the best solution.
I will try yours as well.
Try using a forloop.
foreach "Configuration File Entry:/etc/resolv.conf/nameserver*"
value 1 as string equals 18.104.22.168 OR
value 1 as string equals 22.214.171.124
The "correct" solution would be using a grammar that will append the value of the nameserver to form an unique key, so that each nameserver can be identified correctly. However, I don't know if such grammar exists in BL or a new grammar needs to be written for that.
But what if you audit two servers, and discover a misalignment?
What happens if you attempt to "Sync with master"?
The grammar should be able to align the file in the original format/syntax, no matter of what is shown at screen.
And, one more concern: what should a sys admin think, when he sees that nameserver entries are all on one line?
Should not he believe that the file has been corrupted somehow?