diff options
author | David Cantrell <dcantrell@redhat.com> | 2006-08-01 21:49:11 +0000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2006-08-01 21:49:11 +0000 |
commit | 9f881a676af43807e74465db929fcdee32bbc02e (patch) | |
tree | f535a3a75d303428b3dbfab733e6559d8956c511 /loader2 | |
parent | b7520d97c49b5b6c6b0b2dac548fa805dcb3922a (diff) | |
download | anaconda-9f881a676af43807e74465db929fcdee32bbc02e.tar.gz anaconda-9f881a676af43807e74465db929fcdee32bbc02e.tar.xz anaconda-9f881a676af43807e74465db929fcdee32bbc02e.zip |
* loader2/nfsinstall.c (getFileFromNfs): More useful log message than
"foo bar", set client IP string correctly before calling
getHostandPath() (BZ #195203).
* loader2/kickstart.c (getHostandPath): Debug log messages.
Diffstat (limited to 'loader2')
-rw-r--r-- | loader2/kickstart.c | 7 | ||||
-rw-r--r-- | loader2/nfsinstall.c | 13 |
2 files changed, 15 insertions, 5 deletions
diff --git a/loader2/kickstart.c b/loader2/kickstart.c index ecddee87e..3d53cd462 100644 --- a/loader2/kickstart.c +++ b/loader2/kickstart.c @@ -307,10 +307,15 @@ void getHostandPath(char * ksSource, char **host, char ** file, char * ip) { **file = '\0'; } + logMessage(DEBUGLVL, "getHostandPath file(1): |%s|", *file); + + /* if the filename ends with / or is null, use default kickstart + * name of IP_ADDRESS-kickstart appended to *file + */ if ((*file) && (((*file)[strlen(*file) - 1] == '/') || ((*file)[strlen(*file) - 1] == '\0'))) { *file = sdupprintf("%s%s-kickstart", *file, ip); - + logMessage(DEBUGLVL, "getHostandPath file(2): |%s|", *file); } } diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c index d1ffbca1d..9a36a6441 100644 --- a/loader2/nfsinstall.c +++ b/loader2/nfsinstall.c @@ -304,13 +304,18 @@ int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) { } else { inet_ntop(tip->sa_family, IP_ADDR(tip), ret, IP_STRLEN(tip)); url = sdupprintf("%s:%s", ret, netCfg.dev.bootFile); - logMessage(INFO, "foo bar"); + logMessage(INFO, "bootp: bootfile is %s", netCfg.dev.bootFile); } } - - logMessage(INFO, "url is %s", url); - inet_ntop(tip->sa_family, IP_ADDR(tip), ret, IP_STRLEN(tip)); + /* get the IP of the target system */ + tip = &(netCfg.dev.ip); + if (inet_ntop(tip->sa_family, IP_ADDR(tip), ret, IP_STRLEN(tip)) == NULL) { + logMessage(ERROR, "getFileFromNfs: no client IP information"); + return 1; + } + + logMessage(INFO, "url is %s", url); getHostandPath(url, &host, &path, ret); opts = strchr(host, ':'); |