Add dereference option when importing the kernel.

Due to the nature of provisioning nodes, when there are symbolic
links involved we want to copy the file that they point to instead
of copying the link.
This commit is contained in:
Michael L. Young
2022-02-08 14:56:12 -05:00
parent c201506ac2
commit 502a970ec8

View File

@@ -198,7 +198,7 @@ func Build(kernelVersion, kernelName, root string) (string, error) {
wwlog.Printf(wwlog.VERBOSE, "Using PIGZ to compress the container: %s\n", compressor)
}
cmd := fmt.Sprintf("cd %s; find .%s | cpio --quiet -o -H newc | %s -c > \"%s\"", root, kernelDriversRelative, compressor, driversDestination)
cmd := fmt.Sprintf("cd %s; find .%s | cpio --quiet -o -L -H newc | %s -c > \"%s\"", root, kernelDriversRelative, compressor, driversDestination)
wwlog.Printf(wwlog.DEBUG, "RUNNING: %s\n", cmd)
err = exec.Command("/bin/sh", "-c", cmd).Run()