I need to be able to add:
alias usb-storage off
to /etc/modprobe.conf
I have this so far:
augeas { "usb-storage":
context => "/files/etc/modprobe.conf",
changes => [ "set alias[last()+1] usb-storage",
"set alias[last()]/modulename off",
],
onlyif => "get alias != usb-storage"
}
The change works, but the onlyif part does not.
augtool> print /files/etc/modprobe.conf/alias[*]
/files/etc/modprobe.conf/alias[1] = "eth0"
/files/etc/modprobe.conf/alias[1]/modulename = "vmnics"
/files/etc/modprobe.conf/alias[2] = "scsi_hostadapter"
/files/etc/modprobe.conf/alias[2]/modulename = "mptbase"
/files/etc/modprobe.conf/alias[3] = "scsi_hostadapter1"
/files/etc/modprobe.conf/alias[3]/modulename = "mptscsih"
/files/etc/modprobe.conf/alias[4] = "char-major-14"
I need to be able to detect if usb-storage already exists as a module name,
so I don't add the alias line multiple times. I've tried several things,
but none of them seem to do what I want.
Does anybody have any ideas? I'm still experimenting, and if I find an
answer, I'll post it.
Thanks
/lsd
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---