Check for the oscdimg executable on both the PATH and known installation
location. When not found, provider a user friendly error message about
the missing executable and a helper link on where it can be found.
Adds suppport for configuring networking on amazonlinux when
network devices are handled by networkd. When not handled by
networkd, falls back to using the redhat capability.
This commit introduces a Darwin-specific template for NFS exports. This is almost identical to the standard BSD template except it puts each NFS export on its own line.
This resolves NFS issues discovered in macOS Catalina.
StringBlockEditor already adds the necessary newlines. That extra
newline was making /etc/exports longer and longer, full of empty lines,
because StringBlockEditor doesn't know about it and does not remove it.
Check for modinfo in /sbin if it doesn't appear on the PATH.
If it's not found on the PATH or in /sbin, the command will default back to modinfo so the user sees the error message about adding it to their PATH.
On OS X 10.15, / is read-only and paths inside of /Users (and elsewhere)
are mounted via a "firmlink" (which is a new invention in APFS). These
must be resolved to their full path to be shareable via NFS.
/Users/johnsmith/mycode => /System/Volumes/Data/Users/johnsmith/mycode
We check to see if a path is mounted here with `df`, and prepend it.
Firmlinks are only createable by the OS and this wasn't supposed to be
visible to applications anyway:
https://developer.apple.com/videos/play/wwdc2019/710/?time=481
When a large number of shares are defined it may cause the generated
command to exceed the maximum allowed length. To prevent this, only
allow 10 shares to be processed at a time.
Fixes#10483
Since we are no longer extracting information based on key value due
to localization issues, use start and end locations to extract data.
This prevents errors when extra information is included like Scope.
Only move new exports file to destination without sudo when the
file has write access and the directory has write access. Always
use sudo when changing file ownership.
Adds the final line of output to tests and properly simulates
failure. Fix with type casting to prevent calling methods on
nil and drop the final entry as it's not valid.
Fixes#9806
Provides simple nfs service name detection via systemd or sys-v. Defaults
are provided if no match is found. Service name is defined via method
allowing derivative guests to only need to provide an updated name.