The function simply does not know that nfsiso is a thing that can be done
so when the source entered in the UI doesn't contain a .treeinfo file,
it gives up. Instead, it also needs to try looking for and mounting ISO
images.
---
loader/nfsinstall.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 67 insertions(+), 1 deletions(-)
- if (getFileFromNfs(url, "/tmp/.treeinfo", loaderData)) {
+ if (getFileFromNfs(url, "/tmp/.treeinfo", loaderData) && !isNfsIso(loaderData)) {
newtWinMessage(_("Error"), _("OK"),
_("The URL provided does not contain installation media."));
free(url);
--
1.7.1.1
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
02-21-2011, 11:53 PM
"Brian C. Lane"
Handle nfsiso in promptForNfs as well (#678413).
On Mon, Feb 21, 2011 at 04:53:24PM -0500, Chris Lumens wrote:
> The function simply does not know that nfsiso is a thing that can be done
> so when the source entered in the UI doesn't contain a .treeinfo file,
> it gives up. Instead, it also needs to try looking for and mounting ISO
> images.
> ---
> loader/nfsinstall.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 67 insertions(+), 1 deletions(-)
>
> diff --git a/loader/nfsinstall.c b/loader/nfsinstall.c
> index 0e8eb08..8c62f8e 100644
> --- a/loader/nfsinstall.c
> +++ b/loader/nfsinstall.c
> @@ -41,6 +41,7 @@
> #include <nm-dhcp4-config.h>
>
> #include "copy.h"
> +#include "dirbrowser.h"
> #include "loader.h"
> #include "lang.h"
> #include "loadermisc.h"
> @@ -170,6 +171,71 @@ static void addDefaultKickstartFile(char **file, char *ip) {
> }
> }
>
> +static int ends_with_iso(char *dirname, struct dirent *ent) {
> + char *suffix;
> +
> + if (ent->d_type != DT_REG)
> + return 0;
> +
> + suffix = rindex(ent->d_name, '.');
> + return (!strcmp(suffix, "iso"));
This should be ".iso", rindex points to the char being searched for.
The rest looks good to me.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
02-22-2011, 02:00 PM
Chris Lumens
Handle nfsiso in promptForNfs as well (#678413).
> > +static int ends_with_iso(char *dirname, struct dirent *ent) {
> > + char *suffix;
> > +
> > + if (ent->d_type != DT_REG)
> > + return 0;
> > +
> > + suffix = rindex(ent->d_name, '.');
> > + return (!strcmp(suffix, "iso"));
>
> This should be ".iso", rindex points to the char being searched for.
>
> The rest looks good to me.
Okay, this would need to be fixed in promptForHd as well.
- Chris
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list