summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2013-11-25 11:31:42 +0000
committerbapt <bapt@FreeBSD.org>2013-11-25 11:31:42 +0000
commitd88ffcbc993fc7ff222c290a07ea26739446c1d9 (patch)
tree4960c4596119888d276eb1e054ec04c134d06caf /usr.sbin
parentfa0e069a02747538a8e14c1468b8a5cda2005a16 (diff)
downloadFreeBSD-src-d88ffcbc993fc7ff222c290a07ea26739446c1d9.zip
FreeBSD-src-d88ffcbc993fc7ff222c290a07ea26739446c1d9.tar.gz
Do not create pkg.conf, as it is not necessary anymore and packagesite is deprecated
Reported by: glebius MFC after: 3 days
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg/pkg.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c
index bceea3d..89e07cc 100644
--- a/usr.sbin/pkg/pkg.c
+++ b/usr.sbin/pkg/pkg.c
@@ -740,12 +740,9 @@ cleanup:
static int
bootstrap_pkg(bool force)
{
- FILE *config;
int fd_pkg, fd_sig;
int ret;
- char *site;
char url[MAXPATHLEN];
- char conf[MAXPATHLEN];
char tmppkg[MAXPATHLEN];
char tmpsig[MAXPATHLEN];
const char *packagesite;
@@ -754,7 +751,6 @@ bootstrap_pkg(bool force)
fd_sig = -1;
ret = -1;
- config = NULL;
if (config_string(PACKAGESITE, &packagesite) != 0) {
warnx("No PACKAGESITE defined");
@@ -801,26 +797,6 @@ bootstrap_pkg(bool force)
if ((ret = extract_pkg_static(fd_pkg, pkgstatic, MAXPATHLEN)) == 0)
ret = install_pkg_static(pkgstatic, tmppkg, force);
- snprintf(conf, MAXPATHLEN, "%s/etc/pkg.conf",
- getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE);
-
- if (access(conf, R_OK) == -1) {
- site = strrchr(url, '/');
- if (site == NULL)
- goto cleanup;
- site[0] = '\0';
- site = strrchr(url, '/');
- if (site == NULL)
- goto cleanup;
- site[0] = '\0';
-
- config = fopen(conf, "w+");
- if (config == NULL)
- goto cleanup;
- fprintf(config, "packagesite: %s\n", url);
- fclose(config);
- }
-
goto cleanup;
fetchfail:
OpenPOWER on IntegriCloud