Created
October 1, 2013 08:48
-
-
Save frastel/6775604 to your computer and use it in GitHub Desktop.
Hacked acl puppet module for adding acl to the main partition of a precise64 vagrant box. This manifest is quite dangerous because you could break your complete box when used in the wrong way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class acl( | |
$needle = '/precise64-root', | |
) { | |
package { "acl": | |
ensure => installed, | |
} | |
# https://gist.github.com/4595997 | |
exec { "add_fstab_acl": | |
command => "/bin/sed -i.backup '/${needle}/s/errors/acl,errors/g' /etc/fstab", | |
unless => "/bin/grep -E '${needle}.*acl,errors' /etc/fstab", | |
path => "/usr/local/bin/:/bin/", | |
} | |
exec { "remount-root-partition": | |
command => "mount -o remount /", | |
path => "/bin", | |
unless => "mount | grep acl 2>/dev/null", | |
require => Exec["add_fstab_acl"], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment