Hi everyone. I am attempting to add this line to /etc/inittab:
TS0:23:respawn:/sbin/mgetty -m '"" \d\dAT OK' ttyS0
Here is the puppet manifest I am trying to make:
augeas {"/etc/inittab":
context => "/files/etc/inittab",
changes => [
"set TS0/runlevels 23",
"set TS0/action respawn",
"set TS0/process '/sbin/mgetty -m \'\"\" \\d\\dAT OK\' ttyS0'",
],
}
Here is the pertinent debug output from a manual run feeding that code to
puppet:
debug: Augeas[/etc/inittab](provider=augeas): Opening augeas with root /,
lens path , flags 0
debug: Augeas[/etc/inittab](provider=augeas): Augeas version 0.10.0 is
installed
debug: Augeas[/etc/inittab](provider=augeas): Will attempt to save and only
run if files changed
debug: Augeas[/etc/inittab](provider=augeas): sending command 'set' with
params ["/files/etc/inittab/TS0/runlevels", "23"]
debug: Augeas[/etc/inittab](provider=augeas): sending command 'set' with
params ["/files/etc/inittab/TS0/action", "respawn"]
debug: Augeas[/etc/inittab](provider=augeas): sending command 'set' with
params ["/files/etc/inittab/TS0/process", "/sbin/mgetty -m "]
debug: Augeas[/etc/inittab](provider=augeas): Executing 'diff -u
/etc/inittab /etc/inittab.augnew'
notice: Augeas[/etc/inittab](provider=augeas):
--- /etc/inittab 2014-11-03 13:38:21.644041304 +0000
+++ /etc/inittab.augnew 2014-11-03 13:40:56.088022067 +0000
@@ -71,3 +71,4 @@
#
#
#
+TS0:23:respawn:/sbin/mgetty -m
debug: Augeas[/etc/inittab](provider=augeas): Files changed, should execute
debug: Augeas[/etc/inittab](provider=augeas): sending command 'set' with
params ["/files/etc/inittab/TS0/runlevels", "23"]
debug: Augeas[/etc/inittab](provider=augeas): sending command 'set' with
params ["/files/etc/inittab/TS0/action", "respawn"]
debug: Augeas[/etc/inittab](provider=augeas): sending command 'set' with
params ["/files/etc/inittab/TS0/process", "/sbin/mgetty -m "]
debug: Augeas[/etc/inittab](provider=augeas): Closed the augeas connection
Can anyone show me the proper way to shape this line with whitespaces and
single/double quotes into inittab using augeas and puppet?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/474bdc13-b2c3-48e4-a87a-55f98a046dab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.