summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2013-11-30 17:33:49 +0000
committergjb <gjb@FreeBSD.org>2013-11-30 17:33:49 +0000
commitb7e8f6268b4e75078533e5ea627459d4213cb1fb (patch)
treebc12f0d41003057db08406b2ce36a124d1c1bc12 /usr.sbin
parentbe650673e41a61818b5677339114010414c509a8 (diff)
downloadFreeBSD-src-b7e8f6268b4e75078533e5ea627459d4213cb1fb.zip
FreeBSD-src-b7e8f6268b4e75078533e5ea627459d4213cb1fb.tar.gz
MFC r258550:
Do not create pkg.conf, as it is not necessary anymore and packagesite is deprecated Approved by: re (glebius) Sponsored by: The FreeBSD Foundation
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 8af31a7..6764b8d 100644
--- a/usr.sbin/pkg/pkg.c
+++ b/usr.sbin/pkg/pkg.c
@@ -747,12 +747,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;
@@ -761,7 +758,6 @@ bootstrap_pkg(bool force)
fd_sig = -1;
ret = -1;
- config = NULL;
if (config_string(PACKAGESITE, &packagesite) != 0) {
warnx("No PACKAGESITE defined");
@@ -808,26 +804,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