Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167712133
D58959.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58959.diff
View Options
diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh
--- a/tools/tools/nanobsd/defaults.sh
+++ b/tools/tools/nanobsd/defaults.sh
@@ -667,6 +667,28 @@
pkg_cmd repo "$(nano_pkg_cachedir)"
}
+nano_pkg_disable_repos() {
+ (
+ cd "$NANO_WORLDDIR"
+
+ rm -rf var/db/pkg/repos/FreeBSD-local
+
+ # XXX: Is it better to just rewrite the entire file?
+ sed -i "" -E \
+ -e "s/([[:space:]]*enabled[[:space:]]*:[[:space:]]*)(yes|true|on)/\1no/" \
+ -e "s/To disable a repository/To enable a repository/" \
+ -e "s/FreeBSD-ports: \{ enabled: no \}/FreeBSD-ports: { enabled: yes }/" \
+ -e "s/FreeBSD-ports-kmods: \{ enabled: no \}/FreeBSD-ports-kmods: { enabled: yes }/" \
+ -e "s/Note that the FreeBSD-base repository is disabled by default\./Note that all repositories are disabled by default./" \
+ etc/pkg/FreeBSD.conf
+
+ if $do_precompiled; then
+ tgt_pkg_update_file_sha256 etc/pkg/FreeBSD.conf
+ tgt_pkg_update_config_files_content etc/pkg/FreeBSD.conf
+ fi
+ )
+}
+
#
# Validate NANO_PKGBASE_LIST requirements, optionally clean the package cache,
# write the pkg repo config, and fetch pkgbase packages
@@ -1261,6 +1283,11 @@
# to have the symlink in error though.
tgt_dir2symlink usr/local/etc ../../etc/local 0755
+ # Disable all package repositories
+ if [ -z "$NANO_NOPKGBASE" ]; then
+ nano_pkg_disable_repos
+ fi
+
for d in var etc; do
# Link /$d under /conf
# we use hard links so we have them both places.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 24, 10:23 PM (6 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37204605
Default Alt Text
D58959.diff (1 KB)
Attached To
Mode
D58959: nanobsd: Disable pkg repositories on target image
Attached
Detach File
Event Timeline
Log In to Comment