Skip to content

Commit

Permalink
Ensure we rebuild dracut when changing /etc/fstab
Browse files Browse the repository at this point in the history
Summary: Dracut gets a copy of `/etc/fstab` to know what disks to mount before changeroot, so we need to make sure that any change (like reconfiguring the mount options) is reflected into dracut's copy

Differential Revision: D57394916

fbshipit-source-id: 04b745c47bb5098d6856ab0780ec2bc11e9fd7ad
  • Loading branch information
Olivier Raginel authored and facebook-github-bot committed May 15, 2024
1 parent 110297b commit d9c1d01
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cookbooks/fb_dracut/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@
not_if { node.container? || node.quiescent? || node['fb_dracut']['disable'] }
command 'dracut --force'
action :nothing
subscribes :run, 'template[/etc/sysctl.conf]'
subscribes :run, 'package[e2fsprogs]'
subscribes :run, 'template[/etc/e2fsck.conf]'
subscribes :run, 'template[/etc/modprobe.d/fb_modprobe.conf]'
subscribes :run, 'template[/etc/fstab]'
if node.systemd?
subscribes :run, 'package[systemd packages]'
subscribes :run, 'template[/etc/systemd/system.conf]'
subscribes :run, 'template[/etc/sysctl.conf]'
subscribes :run, 'package[e2fsprogs]'
subscribes :run, 'template[/etc/e2fsck.conf]'
subscribes :run, 'template[/etc/modprobe.d/fb_modprobe.conf]'
end
end

0 comments on commit d9c1d01

Please sign in to comment.