This is a much more readable and reasonable patch to restore the
'ks' boot option functionality. The nextserver and bootfile are
read from the DHCP option set and used to build the URL to find
the kickstart file.
[rawhide]
---
loader/nfsinstall.c | 105 ++++++++++++++++++++++++++++++++++++++------------
1 files changed, 80 insertions(+), 25 deletions(-)
diff --git a/loader/nfsinstall.c b/loader/nfsinstall.c
index 9a61cad..a098fe3 100644
--- a/loader/nfsinstall.c
+++ b/loader/nfsinstall.c
@@ -476,8 +531,8 @@ int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) {
failed = 1;
}
- free(host);
- free(path);
+ if (host) free(host);
+ if (path) free(path);
if (ip) free(ip);
umount("/tmp/mnt");