Skip to content

Commit

Permalink
fix openwrt nfs synched folders
Browse files Browse the repository at this point in the history
in openwrt, /sbin/init --version does not print the version, instead it calls init, which breaks the running system

this was already fixed in #7813 but somehow was lost in later code changes
  • Loading branch information
rgl committed Jun 10, 2024
1 parent 54a1999 commit 7dacc4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/synced_folders/unix_mount_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def find_mount_options_id(id_name, mount_options)
def emit_upstart_notification(machine, guest_path)
# Emit an upstart event if we can
machine.communicate.sudo <<-EOH.gsub(/^ {12}/, "")
if command -v /sbin/init && /sbin/init 2>/dev/null --version | grep upstart; then
if test -x /sbin/initctl && command -v /sbin/init && /sbin/init 2>/dev/null --version | grep upstart; then
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{guest_path}
fi
EOH
Expand Down

0 comments on commit 7dacc4b

Please sign in to comment.