From 502a970ec820a21d9582b0099e1ec7d077253c7b Mon Sep 17 00:00:00 2001 From: "Michael L. Young" Date: Tue, 8 Feb 2022 14:56:12 -0500 Subject: [PATCH] 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. --- internal/pkg/kernel/kernel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/kernel/kernel.go b/internal/pkg/kernel/kernel.go index 0841d927..37941032 100644 --- a/internal/pkg/kernel/kernel.go +++ b/internal/pkg/kernel/kernel.go @@ -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()