diff options
author | Jeremy Katz <katzj@redhat.com> | 2003-01-23 22:21:06 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2003-01-23 22:21:06 +0000 |
commit | 87a10efed6a06b14ecf4bca18afac09ad7800d45 (patch) | |
tree | 8a34bb7df65a690e2d05154f1c305c239ef8afd0 /loader2/nfsinstall.c | |
parent | b16522d567a648ea427dbce87b697610acdff673 (diff) | |
download | anaconda-87a10efed6a06b14ecf4bca18afac09ad7800d45.tar.gz anaconda-87a10efed6a06b14ecf4bca18afac09ad7800d45.tar.xz anaconda-87a10efed6a06b14ecf4bca18afac09ad7800d45.zip |
add back support for 'linux ks' to grab server and filename from dhcp (#82404)
Diffstat (limited to 'loader2/nfsinstall.c')
-rw-r--r-- | loader2/nfsinstall.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c index 69526ee6c..1598e362f 100644 --- a/loader2/nfsinstall.c +++ b/loader2/nfsinstall.c @@ -26,6 +26,7 @@ #include "loader.h" #include "lang.h" #include "loadermisc.h" +#include "kickstart.h" #include "log.h" #include "method.h" #include "nfsinstall.h" @@ -286,13 +287,34 @@ int kickstartFromNfs(char * url, struct knownDevices * kd, return 1; } + /* if they just did 'linux ks', they want us to figure it out from + * the dhcp/bootp information + */ + if (url == NULL) { + if (!(netCfg.dev.set & PUMP_INTFINFO_HAS_NEXTSERVER)) { + logMessage("no bootserver was found"); + return 1; + } + + if (!(netCfg.dev.set & PUMP_INTFINFO_HAS_BOOTFILE)) { + url = sdupprintf("%s:%s", inet_ntoa(netCfg.dev.nextServer), + "/kickstart/"); + logMessage("bootp: no bootfile received"); + } else { + url = sdupprintf("%s:%s", inet_ntoa(netCfg.dev.nextServer), + netCfg.dev.bootFile); + } + } + + logMessage("url is %s", url); + getHostandPath(url, &host, &path, inet_ntoa(netCfg.dev.ip)); /* nfs has to be a little bit different... split off the last part as * the file and then concatenate host + dir path */ file = strrchr(path, '/'); if (!file) { - file = "/"; + file = path; } else { *file++ ='\0'; host = sdupprintf("%s/%s", host, path); |