hai wu <haiwu...@gmail.com> writes: > Hi, I need to add one line to /etc/securetty, say it needs to be ttyS1. Do > not add it if ttyS1 already exists in file /etc/securetty.
I strongly suggest you copy into place a file that contains exactly the content you want: editing files in place is an invitation to screw things up later, and for a security related file that can be terrible. > How to achieve this using puppet module in puppet 2.5? This file is > different than the other examples using augeas, this one only has value per > line, not name-val pair. You /could/ use an exec like this: exec { "/bin/echo ttyS1 >> /etc/securetty": unless "/bin/grep ttyS1 /etc/securetty" } I *really* don't recommend that approach. Daniel -- ✣ Daniel Pittman ✉ dan...@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.