Found a way to do this with Augeas:
# Install ACL and remount the root volume with ACL enabled case node[:platform] when "debian","ubuntu" %w{acl augeas-tools}.each do |pkg| package pkg end execute "update_fstab" do command <<-EOF echo 'ins opt after /files/etc/fstab/*[file="/"]/opt[last()] set /files/etc/fstab/*[file="/"]/opt[last()] acl save' | augtool mount -o remount / EOF not_if "augtool match '/files/etc/fstab/*[file=\"/\"]/opt' | grep acl" end end
I don't like this solution, but it seems to work. However, there must be a better way, right?
source share