[rhel6-branch] Fix ks fetching on nfs via vlan (#1067857)

Vratislav Podzimek vpodzime at redhat.com
Fri Aug 1 14:56:48 UTC 2014


On Fri, 2014-08-01 at 10:06 -0400, Samantha N. Bueno wrote:
> 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);
> +    }
You can drop the curly brackets in this if statement if you want to.

> +    if ((ip = iface_ip2str(devicename, AF_INET)) == NULL) {
> +        logMessage(ERROR, "iface_ip2str returned NULL for %s", devicename);
>          return 1;
>      }
>  
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic




More information about the anaconda-patches mailing list