Skip to content

Instantly share code, notes, and snippets.

@frastel
Created October 1, 2013 08:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frastel/6775604 to your computer and use it in GitHub Desktop.
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.
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