diff options
author | jhb <jhb@FreeBSD.org> | 2000-07-25 23:22:16 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2000-07-25 23:22:16 +0000 |
commit | 4600fb1a7e25bffa13cd44b84ed7bfabdb751d15 (patch) | |
tree | 47a9677a9f574dd340094fd97275e9aee02fd4df | |
parent | 7c0d02d7cb751b591a5842821fdf35f350b10f79 (diff) | |
download | FreeBSD-src-4600fb1a7e25bffa13cd44b84ed7bfabdb751d15.zip FreeBSD-src-4600fb1a7e25bffa13cd44b84ed7bfabdb751d15.tar.gz |
Use a much saner method of locating the release directory on an FTP server.
Now, if a release is specified, instead of just looking for a directory
with the same name as the release, try several possible directories (each
suffixed with the release name) relative to the base directory including
".", "releases/MACHINE", "snapshots/MACHINE", and each of those prefixed
with "pub/FreeBSD/". This will allow us to remove the evil symlinks under
pub/FreeBSD/releases/MACHINE/ to the snapshots on the ftp site.
-rw-r--r-- | release/sysinstall/ftp.c | 62 | ||||
-rw-r--r-- | release/sysinstall/menus.c | 185 | ||||
-rw-r--r-- | usr.sbin/sade/menus.c | 185 | ||||
-rw-r--r-- | usr.sbin/sysinstall/ftp.c | 62 | ||||
-rw-r--r-- | usr.sbin/sysinstall/menus.c | 185 |
5 files changed, 354 insertions, 325 deletions
diff --git a/release/sysinstall/ftp.c b/release/sysinstall/ftp.c index 9c0deb8..f83367e 100644 --- a/release/sysinstall/ftp.c +++ b/release/sysinstall/ftp.c @@ -48,6 +48,11 @@ Boolean ftpInitted = FALSE; static FILE *OpenConn; int FtpPort; +/* List of sub directories to look for under a given FTP server. */ +static const char *ftp_dirs[] = { ".", "releases/"MACHINE, "snapshots/"MACHINE, + "pub/FreeBSD", "pub/FreeBSD/releases/"MACHINE, + "pub/FreeBSD/snapshots/"MACHINE, NULL }; + /* Brings up attached network device, if any - takes FTP device as arg */ static Boolean netUp(Device *dev) @@ -73,7 +78,7 @@ netDown(Device *dev) Boolean mediaInitFTP(Device *dev) { - int i, code, af; + int i, code, af, fdir; char *cp, *rel, *hostname, *dir; char *user, *login_name, password[80]; @@ -141,32 +146,55 @@ try: } } - /* Give it a shot - can't hurt to try and zoom in if we can, unless the release is set to - __RELEASE or "none" which signifies that it's not set */ + /* + * Now that we've verified that the path we're given is ok, let's try to + * be a bit intelligent in locating the release we are looking for. First + * off, if the release is specified as "__RELEASE" or "none", then just + * assume that the current directory is the one we want and give up. + */ rel = variable_get(VAR_RELNAME); - if (strcmp(rel, "__RELEASE") && strcmp(rel, "none")) - i = ftpChdir(OpenConn, rel); - else - i = 0; - if (i) { - if (!msgYesNo("Warning: Can't CD to `%s' distribution on this\n" + if (strcmp(rel, "__RELEASE") && strcmp(rel, "none")) { + /* + * Ok, since we have a release variable, let's walk through the list + * of directories looking for a release directory. The first one to + * match wins. For each case, we chdir to ftp_dirs[fdir] first. If + * that fails, we skip to the next one. Otherwise, we try to chdir to + * rel. If it succeeds we break out. If it fails, then we go back to + * the base directory and try again. Lots of chdirs, but oh well. :) + */ + fdir = 0; + while (ftp_dirs[fdir] != NULL) { + if (ftpChdir(OpenConn, ftp_dirs[fdir++]) != 0) + continue; + if (ftpChdir(OpenConn, rel) == 0) { + ftpInitted = TRUE; + return TRUE; + } + ftpChdir(OpenConn, "/"); + if (dir && *dir != '\0') + ftpChdir(OpenConn, dir); + } + + /* + * If we get here, then all of the directories we tried failed, so + * print out the error message and ask the user if they want to try + * again. + */ + if (!msgYesNo("Warning: Can't find the `%s' distribution on this\n" "FTP server. You may need to visit a different server for\n" - "the release you're trying to fetch or go to the Options\n" + "the release you are trying to fetch or go to the Options\n" "menu and to set the release name to explicitly match what's\n" "available on %s (or set to \"none\").\n\n" "Would you like to select another FTP server?", rel, hostname)) { variable_unset(VAR_FTP_PATH); - if (DITEM_STATUS(mediaSetFTP(NULL)) == DITEM_FAILURE) - goto punt; - else + if (DITEM_STATUS(mediaSetFTP(NULL)) != DITEM_FAILURE) goto try; } - else - goto punt; + } else { + ftpInitted = TRUE; + return TRUE; } - ftpInitted = TRUE; - return TRUE; punt: ftpInitted = FALSE; diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c index c6a4d6e..7fa5198 100644 --- a/release/sysinstall/menus.c +++ b/release/sysinstall/menus.c @@ -36,15 +36,6 @@ #include "sysinstall.h" -#if defined(__alpha__) -#define _AS(str) str "alpha/" -#elif defined(PC98) -#define _AS(str) str "pc98/" -#else -#define _AS(str) str "i386/" -#endif -#define _AP(str) _AS(str "/pub/FreeBSD/releases/") - /* Miscellaneous work routines for menus */ static int setSrc(dialogMenuItem *self) @@ -546,183 +537,183 @@ DMenu MenuMediaFTP = { "Select a site that's close!", "install", { { "Primary Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://ftp.freebsd.org/pub/FreeBSD/releases/") }, + VAR_FTP_PATH "=ftp://ftp.freebsd.org" }, { "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=other" }, { " 5.0 SNAP Server", "current.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://current.freebsd.org/pub/FreeBSD/snapshots/") }, + VAR_FTP_PATH "=ftp://current.freebsd.org" }, { " 4.0 SNAP Server", "releng4.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://releng4.freebsd.org/pub/FreeBSD/snapshots/") }, + VAR_FTP_PATH "=ftp://releng4.freebsd.org/pub/FreeBSD/snapshots/" }, { " IPv6 Ready", "ftp7.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.jp.freebsd.org" }, { "Argentina", "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ar.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ar.freebsd.org" }, { " Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.au.freebsd.org" }, { " Australia #2","ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org" }, { " Australia #3","ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org" }, { " Australia #4","ftp4.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.au.freebsd.org" }, { " Australia #5","ftp5.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.au.freebsd.org" }, { "Brazil", "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.br.freebsd.org" }, { " Brazil #2", "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org" }, { " Brazil #3", "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org" }, { " Brazil #4", "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org" }, { " Brazil #5", "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org" }, { " Brazil #6", "ftp6.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.br.freebsd.org" }, { " Brazil #7", "ftp7.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.br.freebsd.org" }, { " Canada", "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ca.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org" }, { " Czech Republic", "ftp.cz.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.cz.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.cz.freebsd.org" }, { "Denmark", "ftp.dk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.dk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.dk.freebsd.org" }, { " Denmark #2", "ftp2.dk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.dk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.dk.freebsd.org" }, { "Estonia", "ftp.ee.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ee.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ee.freebsd.org" }, { "Finland", "ftp.fi.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.fi.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.fi.freebsd.org" }, { " France", "ftp.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.fr.freebsd.org" }, { " France #2", "ftp2.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.fr.freebsd.org" }, { " France #3", "ftp3.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" }, { " France #4", "ftp4.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" }, { " France #5", "ftp5.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" }, { "Germany", "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.de.freebsd.org" }, { " Germany #2", "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org" }, { " Germany #3", "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org" }, { " Germany #4", "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org" }, { " Germany #5", "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org" }, { " Germany #6", "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org" }, { " Germany #7", "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org" }, { "Holland", "ftp.nl.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.nl.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.nl.freebsd.org" }, { " Hong Kong", "ftp.hk.super.net", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.hk.super.net") }, + VAR_FTP_PATH "=ftp://ftp.hk.super.net" }, { "Iceland", "ftp.is.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.is.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.is.freebsd.org" }, { " Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ie.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org" }, { " Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.il.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.il.freebsd.org" }, { " Israel #2", "ftp2.il.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.il.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.il.freebsd.org" }, { "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org" }, { " Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org" }, { " Japan #3", "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org" }, { " Japan #4", "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org" }, { " Japan #5", "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org" }, { " Japan #6", "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org" }, { " Japan #7", "ftp7.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.jp.freebsd.org" }, { "Korea", "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org" }, { " Korea #2", "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org" }, { " Korea #3", "ftp3.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.kr.freebsd.org" }, { " Korea #4", "ftp4.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.kr.freebsd.org" }, { " Korea #5", "ftp5.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.kr.freebsd.org" }, { "New Zealand", "ftp.nz.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.nz.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.nz.freebsd.org" }, { "Poland", "ftp.pl.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.pl.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.pl.freebsd.org" }, { " Portugal", "ftp.pt.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.pt.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.pt.freebsd.org" }, { " Portugal #2", "ftp2.pt.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.pt.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.pt.freebsd.org" }, { "Russia", "ftp.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ru.freebsd.org" }, { " Russia #2", "ftp2.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.ru.freebsd.org" }, { " Russia #3", "ftp3.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.ru.freebsd.org" }, { " Russia #4", "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.ru.freebsd.org" }, { "Slovak Republic", "ftp.sk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.sk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.sk.freebsd.org" }, { "Slovenia", "ftp.si.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.si.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.si.freebsd.org" }, { " South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.za.freebsd.org" }, { " South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org" }, { " South Africa #3", "ftp3.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.za.freebsd.org" }, { " South Africa #4", "ftp4.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.za.freebsd.org" }, { " Spain", "ftp.es.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.es.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.es.freebsd.org" }, { " Spain #2", "ftp2.es.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.es.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.es.freebsd.org" }, { " Sweden", "ftp.se.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.se.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.se.freebsd.org" }, { " Sweden #2", "ftp2.se.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.se.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.se.freebsd.org" }, { " Sweden #3", "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.se.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.se.freebsd.org" }, { "Taiwan", "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org" }, { " Taiwan #2", "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org" }, { " Taiwan #3", "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org" }, { " Taiwan #4", "ftp4.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.tw.freebsd.org" }, { " Thailand", "ftp.nectec.or.th", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/") }, + VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/" }, { "UK", "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org" }, { " UK #2", "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org" }, { " UK #3", "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org" }, { " UK #4", "ftp4.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.uk.freebsd.org" }, { " UK #5", "ftp5.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.uk.freebsd.org" }, { " USA", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.freebsd.org" }, { " USA #2", "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.freebsd.org" }, { " USA #3", "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.freebsd.org" }, { " USA #4", "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.freebsd.org" }, { " USA #5", "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.freebsd.org" }, { " USA #6", "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.freebsd.org" }, { NULL } } }; diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c index c6a4d6e..7fa5198 100644 --- a/usr.sbin/sade/menus.c +++ b/usr.sbin/sade/menus.c @@ -36,15 +36,6 @@ #include "sysinstall.h" -#if defined(__alpha__) -#define _AS(str) str "alpha/" -#elif defined(PC98) -#define _AS(str) str "pc98/" -#else -#define _AS(str) str "i386/" -#endif -#define _AP(str) _AS(str "/pub/FreeBSD/releases/") - /* Miscellaneous work routines for menus */ static int setSrc(dialogMenuItem *self) @@ -546,183 +537,183 @@ DMenu MenuMediaFTP = { "Select a site that's close!", "install", { { "Primary Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://ftp.freebsd.org/pub/FreeBSD/releases/") }, + VAR_FTP_PATH "=ftp://ftp.freebsd.org" }, { "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=other" }, { " 5.0 SNAP Server", "current.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://current.freebsd.org/pub/FreeBSD/snapshots/") }, + VAR_FTP_PATH "=ftp://current.freebsd.org" }, { " 4.0 SNAP Server", "releng4.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://releng4.freebsd.org/pub/FreeBSD/snapshots/") }, + VAR_FTP_PATH "=ftp://releng4.freebsd.org/pub/FreeBSD/snapshots/" }, { " IPv6 Ready", "ftp7.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.jp.freebsd.org" }, { "Argentina", "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ar.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ar.freebsd.org" }, { " Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.au.freebsd.org" }, { " Australia #2","ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org" }, { " Australia #3","ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org" }, { " Australia #4","ftp4.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.au.freebsd.org" }, { " Australia #5","ftp5.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.au.freebsd.org" }, { "Brazil", "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.br.freebsd.org" }, { " Brazil #2", "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org" }, { " Brazil #3", "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org" }, { " Brazil #4", "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org" }, { " Brazil #5", "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org" }, { " Brazil #6", "ftp6.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.br.freebsd.org" }, { " Brazil #7", "ftp7.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.br.freebsd.org" }, { " Canada", "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ca.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org" }, { " Czech Republic", "ftp.cz.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.cz.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.cz.freebsd.org" }, { "Denmark", "ftp.dk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.dk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.dk.freebsd.org" }, { " Denmark #2", "ftp2.dk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.dk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.dk.freebsd.org" }, { "Estonia", "ftp.ee.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ee.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ee.freebsd.org" }, { "Finland", "ftp.fi.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.fi.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.fi.freebsd.org" }, { " France", "ftp.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.fr.freebsd.org" }, { " France #2", "ftp2.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.fr.freebsd.org" }, { " France #3", "ftp3.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" }, { " France #4", "ftp4.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" }, { " France #5", "ftp5.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" }, { "Germany", "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.de.freebsd.org" }, { " Germany #2", "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org" }, { " Germany #3", "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org" }, { " Germany #4", "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org" }, { " Germany #5", "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org" }, { " Germany #6", "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org" }, { " Germany #7", "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org" }, { "Holland", "ftp.nl.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.nl.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.nl.freebsd.org" }, { " Hong Kong", "ftp.hk.super.net", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.hk.super.net") }, + VAR_FTP_PATH "=ftp://ftp.hk.super.net" }, { "Iceland", "ftp.is.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.is.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.is.freebsd.org" }, { " Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ie.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org" }, { " Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.il.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.il.freebsd.org" }, { " Israel #2", "ftp2.il.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.il.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.il.freebsd.org" }, { "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org" }, { " Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org" }, { " Japan #3", "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org" }, { " Japan #4", "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org" }, { " Japan #5", "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org" }, { " Japan #6", "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org" }, { " Japan #7", "ftp7.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.jp.freebsd.org" }, { "Korea", "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org" }, { " Korea #2", "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org" }, { " Korea #3", "ftp3.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.kr.freebsd.org" }, { " Korea #4", "ftp4.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.kr.freebsd.org" }, { " Korea #5", "ftp5.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.kr.freebsd.org" }, { "New Zealand", "ftp.nz.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.nz.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.nz.freebsd.org" }, { "Poland", "ftp.pl.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.pl.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.pl.freebsd.org" }, { " Portugal", "ftp.pt.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.pt.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.pt.freebsd.org" }, { " Portugal #2", "ftp2.pt.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.pt.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.pt.freebsd.org" }, { "Russia", "ftp.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ru.freebsd.org" }, { " Russia #2", "ftp2.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.ru.freebsd.org" }, { " Russia #3", "ftp3.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.ru.freebsd.org" }, { " Russia #4", "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.ru.freebsd.org" }, { "Slovak Republic", "ftp.sk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.sk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.sk.freebsd.org" }, { "Slovenia", "ftp.si.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.si.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.si.freebsd.org" }, { " South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.za.freebsd.org" }, { " South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org" }, { " South Africa #3", "ftp3.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.za.freebsd.org" }, { " South Africa #4", "ftp4.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.za.freebsd.org" }, { " Spain", "ftp.es.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.es.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.es.freebsd.org" }, { " Spain #2", "ftp2.es.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.es.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.es.freebsd.org" }, { " Sweden", "ftp.se.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.se.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.se.freebsd.org" }, { " Sweden #2", "ftp2.se.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.se.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.se.freebsd.org" }, { " Sweden #3", "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.se.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.se.freebsd.org" }, { "Taiwan", "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org" }, { " Taiwan #2", "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org" }, { " Taiwan #3", "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org" }, { " Taiwan #4", "ftp4.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.tw.freebsd.org" }, { " Thailand", "ftp.nectec.or.th", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/") }, + VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/" }, { "UK", "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org" }, { " UK #2", "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org" }, { " UK #3", "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org" }, { " UK #4", "ftp4.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.uk.freebsd.org" }, { " UK #5", "ftp5.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.uk.freebsd.org" }, { " USA", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.freebsd.org" }, { " USA #2", "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.freebsd.org" }, { " USA #3", "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.freebsd.org" }, { " USA #4", "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.freebsd.org" }, { " USA #5", "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.freebsd.org" }, { " USA #6", "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.freebsd.org" }, { NULL } } }; diff --git a/usr.sbin/sysinstall/ftp.c b/usr.sbin/sysinstall/ftp.c index 9c0deb8..f83367e 100644 --- a/usr.sbin/sysinstall/ftp.c +++ b/usr.sbin/sysinstall/ftp.c @@ -48,6 +48,11 @@ Boolean ftpInitted = FALSE; static FILE *OpenConn; int FtpPort; +/* List of sub directories to look for under a given FTP server. */ +static const char *ftp_dirs[] = { ".", "releases/"MACHINE, "snapshots/"MACHINE, + "pub/FreeBSD", "pub/FreeBSD/releases/"MACHINE, + "pub/FreeBSD/snapshots/"MACHINE, NULL }; + /* Brings up attached network device, if any - takes FTP device as arg */ static Boolean netUp(Device *dev) @@ -73,7 +78,7 @@ netDown(Device *dev) Boolean mediaInitFTP(Device *dev) { - int i, code, af; + int i, code, af, fdir; char *cp, *rel, *hostname, *dir; char *user, *login_name, password[80]; @@ -141,32 +146,55 @@ try: } } - /* Give it a shot - can't hurt to try and zoom in if we can, unless the release is set to - __RELEASE or "none" which signifies that it's not set */ + /* + * Now that we've verified that the path we're given is ok, let's try to + * be a bit intelligent in locating the release we are looking for. First + * off, if the release is specified as "__RELEASE" or "none", then just + * assume that the current directory is the one we want and give up. + */ rel = variable_get(VAR_RELNAME); - if (strcmp(rel, "__RELEASE") && strcmp(rel, "none")) - i = ftpChdir(OpenConn, rel); - else - i = 0; - if (i) { - if (!msgYesNo("Warning: Can't CD to `%s' distribution on this\n" + if (strcmp(rel, "__RELEASE") && strcmp(rel, "none")) { + /* + * Ok, since we have a release variable, let's walk through the list + * of directories looking for a release directory. The first one to + * match wins. For each case, we chdir to ftp_dirs[fdir] first. If + * that fails, we skip to the next one. Otherwise, we try to chdir to + * rel. If it succeeds we break out. If it fails, then we go back to + * the base directory and try again. Lots of chdirs, but oh well. :) + */ + fdir = 0; + while (ftp_dirs[fdir] != NULL) { + if (ftpChdir(OpenConn, ftp_dirs[fdir++]) != 0) + continue; + if (ftpChdir(OpenConn, rel) == 0) { + ftpInitted = TRUE; + return TRUE; + } + ftpChdir(OpenConn, "/"); + if (dir && *dir != '\0') + ftpChdir(OpenConn, dir); + } + + /* + * If we get here, then all of the directories we tried failed, so + * print out the error message and ask the user if they want to try + * again. + */ + if (!msgYesNo("Warning: Can't find the `%s' distribution on this\n" "FTP server. You may need to visit a different server for\n" - "the release you're trying to fetch or go to the Options\n" + "the release you are trying to fetch or go to the Options\n" "menu and to set the release name to explicitly match what's\n" "available on %s (or set to \"none\").\n\n" "Would you like to select another FTP server?", rel, hostname)) { variable_unset(VAR_FTP_PATH); - if (DITEM_STATUS(mediaSetFTP(NULL)) == DITEM_FAILURE) - goto punt; - else + if (DITEM_STATUS(mediaSetFTP(NULL)) != DITEM_FAILURE) goto try; } - else - goto punt; + } else { + ftpInitted = TRUE; + return TRUE; } - ftpInitted = TRUE; - return TRUE; punt: ftpInitted = FALSE; diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c index c6a4d6e..7fa5198 100644 --- a/usr.sbin/sysinstall/menus.c +++ b/usr.sbin/sysinstall/menus.c @@ -36,15 +36,6 @@ #include "sysinstall.h" -#if defined(__alpha__) -#define _AS(str) str "alpha/" -#elif defined(PC98) -#define _AS(str) str "pc98/" -#else -#define _AS(str) str "i386/" -#endif -#define _AP(str) _AS(str "/pub/FreeBSD/releases/") - /* Miscellaneous work routines for menus */ static int setSrc(dialogMenuItem *self) @@ -546,183 +537,183 @@ DMenu MenuMediaFTP = { "Select a site that's close!", "install", { { "Primary Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://ftp.freebsd.org/pub/FreeBSD/releases/") }, + VAR_FTP_PATH "=ftp://ftp.freebsd.org" }, { "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=other" }, { " 5.0 SNAP Server", "current.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://current.freebsd.org/pub/FreeBSD/snapshots/") }, + VAR_FTP_PATH "=ftp://current.freebsd.org" }, { " 4.0 SNAP Server", "releng4.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://releng4.freebsd.org/pub/FreeBSD/snapshots/") }, + VAR_FTP_PATH "=ftp://releng4.freebsd.org/pub/FreeBSD/snapshots/" }, { " IPv6 Ready", "ftp7.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.jp.freebsd.org" }, { "Argentina", "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ar.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ar.freebsd.org" }, { " Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.au.freebsd.org" }, { " Australia #2","ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org" }, { " Australia #3","ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org" }, { " Australia #4","ftp4.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.au.freebsd.org" }, { " Australia #5","ftp5.au.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.au.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.au.freebsd.org" }, { "Brazil", "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.br.freebsd.org" }, { " Brazil #2", "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org" }, { " Brazil #3", "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org" }, { " Brazil #4", "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org" }, { " Brazil #5", "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org" }, { " Brazil #6", "ftp6.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.br.freebsd.org" }, { " Brazil #7", "ftp7.br.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.br.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.br.freebsd.org" }, { " Canada", "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ca.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org" }, { " Czech Republic", "ftp.cz.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.cz.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.cz.freebsd.org" }, { "Denmark", "ftp.dk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.dk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.dk.freebsd.org" }, { " Denmark #2", "ftp2.dk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.dk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.dk.freebsd.org" }, { "Estonia", "ftp.ee.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ee.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ee.freebsd.org" }, { "Finland", "ftp.fi.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.fi.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.fi.freebsd.org" }, { " France", "ftp.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.fr.freebsd.org" }, { " France #2", "ftp2.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.fr.freebsd.org" }, { " France #3", "ftp3.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" }, { " France #4", "ftp4.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" }, { " France #5", "ftp5.fr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.fr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" }, { "Germany", "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.de.freebsd.org" }, { " Germany #2", "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org" }, { " Germany #3", "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org" }, { " Germany #4", "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org" }, { " Germany #5", "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org" }, { " Germany #6", "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org" }, { " Germany #7", "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.de.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org" }, { "Holland", "ftp.nl.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.nl.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.nl.freebsd.org" }, { " Hong Kong", "ftp.hk.super.net", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.hk.super.net") }, + VAR_FTP_PATH "=ftp://ftp.hk.super.net" }, { "Iceland", "ftp.is.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.is.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.is.freebsd.org" }, { " Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ie.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org" }, { " Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.il.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.il.freebsd.org" }, { " Israel #2", "ftp2.il.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.il.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.il.freebsd.org" }, { "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org" }, { " Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org" }, { " Japan #3", "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org" }, { " Japan #4", "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org" }, { " Japan #5", "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org" }, { " Japan #6", "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org" }, { " Japan #7", "ftp7.jp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp7.jp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp7.jp.freebsd.org" }, { "Korea", "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org" }, { " Korea #2", "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org" }, { " Korea #3", "ftp3.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.kr.freebsd.org" }, { " Korea #4", "ftp4.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.kr.freebsd.org" }, { " Korea #5", "ftp5.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.kr.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.kr.freebsd.org" }, { "New Zealand", "ftp.nz.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.nz.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.nz.freebsd.org" }, { "Poland", "ftp.pl.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.pl.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.pl.freebsd.org" }, { " Portugal", "ftp.pt.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.pt.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.pt.freebsd.org" }, { " Portugal #2", "ftp2.pt.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.pt.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.pt.freebsd.org" }, { "Russia", "ftp.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.ru.freebsd.org" }, { " Russia #2", "ftp2.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.ru.freebsd.org" }, { " Russia #3", "ftp3.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.ru.freebsd.org" }, { " Russia #4", "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.ru.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.ru.freebsd.org" }, { "Slovak Republic", "ftp.sk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.sk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.sk.freebsd.org" }, { "Slovenia", "ftp.si.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.si.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.si.freebsd.org" }, { " South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.za.freebsd.org" }, { " South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org" }, { " South Africa #3", "ftp3.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.za.freebsd.org" }, { " South Africa #4", "ftp4.za.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.za.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.za.freebsd.org" }, { " Spain", "ftp.es.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.es.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.es.freebsd.org" }, { " Spain #2", "ftp2.es.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.es.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.es.freebsd.org" }, { " Sweden", "ftp.se.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.se.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.se.freebsd.org" }, { " Sweden #2", "ftp2.se.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.se.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.se.freebsd.org" }, { " Sweden #3", "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.se.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.se.freebsd.org" }, { "Taiwan", "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org" }, { " Taiwan #2", "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org" }, { " Taiwan #3", "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org" }, { " Taiwan #4", "ftp4.tw.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.tw.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.tw.freebsd.org" }, { " Thailand", "ftp.nectec.or.th", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AS("=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/") }, + VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/" }, { "UK", "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org" }, { " UK #2", "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org" }, { " UK #3", "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org" }, { " UK #4", "ftp4.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.uk.freebsd.org" }, { " UK #5", "ftp5.uk.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.uk.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.uk.freebsd.org" }, { " USA", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp.freebsd.org" }, { " USA #2", "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp2.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp2.freebsd.org" }, { " USA #3", "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp3.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp3.freebsd.org" }, { " USA #4", "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp4.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp4.freebsd.org" }, { " USA #5", "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp5.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp5.freebsd.org" }, { " USA #6", "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH _AP("=ftp://ftp6.freebsd.org") }, + VAR_FTP_PATH "=ftp://ftp6.freebsd.org" }, { NULL } } }; |