[rhel6-branch] Fix ks fetching on nfs via vlan (#1067857)
Samantha N. Bueno
sbueno+anaconda at redhat.com
Fri Aug 1 14:06:11 UTC 2014
This just checks the vlan id, which was not being done before.
Patch supplied by Masahiro Matsuya <mmatsuya at redhat.com>
Resolves: rhbz#1067857
---
loader/nfsinstall.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/loader/nfsinstall.c b/loader/nfsinstall.c
index c3019ce..5607fe4 100644
--- a/loader/nfsinstall.c
+++ b/loader/nfsinstall.c
@@ -428,6 +428,7 @@ void setKickstartNfs(struct loaderData_s * loaderData, int argc,
int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) {
char * host = NULL, *path = NULL, * file = NULL, * opts = NULL;
char * chk = NULL, *ip = NULL;
+ char *devicename;
int failed = 0, i = 0;
iface_t iface;
NMClient *client = NULL;
@@ -519,8 +520,12 @@ int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) {
}
/* get the IP of the target system */
- if ((ip = iface_ip2str(loaderData->netDev, AF_INET)) == NULL) {
- logMessage(ERROR, "iface_ip2str returned NULL");
+ devicename = loaderData->netDev;
+ if (loaderData->vlanid){
+ checked_asprintf(&devicename,"%s.%d",loaderData->netDev, loaderData->vlanid);
+ }
+ if ((ip = iface_ip2str(devicename, AF_INET)) == NULL) {
+ logMessage(ERROR, "iface_ip2str returned NULL for %s", devicename);
return 1;
}
--
1.9.3
More information about the anaconda-patches
mailing list