Skip to content

Commit

Permalink
(WIP) cmdline.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Nov 20, 2023
1 parent f4f126d commit 68623ce
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions files/boot_cmdline.aug
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(* /boot/cmdline.txt module for Augeas *)

module Boot_Cmdline =
autoload xfm

let word = /[^ \n\t]+/
let cmdline = [ seq "cmdline" . Util.indent .
[ label "parameter" . store word ] .
[ label "parameter" . Sep.space . store word ]*
. Util.eol ]

let lns = cmdline

let xfm = transform lns (incl "/boot/cmdline.txt")
10 changes: 10 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@
#
class pi {
include augeas

augeas { 'test':
context => '/files/home/jhoblitt/cmdline.txt/1',
lens => 'Boot_Cmdline.lns',
incl => '/home/jhoblitt/cmdline.txt',
load_path => '/usr/share/augeas/lenses/dist',
changes => [
'set parameter[. = "foo"] "foo"',
],
}
}

0 comments on commit 68623ce

Please sign in to comment.