Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F169132651
D58954.id184454.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
D58954.id184454.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
@@ -493,6 +493,25 @@
fi
}
+#
+# Update the content value in the config_files table of the target pkg database.
+# All paths are relative to NANO_WORLDDIR
+#
+tgt_pkg_update_config_files_content() {
+ local escaped_file file
+
+ file="${NANO_WORLDDIR}/${1}"
+ # We need to escape single quotes and avoid $(...) from removing newlines at EOF
+ escaped_file=$(sed "s/'/''/g" "$file"; printf 'EOF')
+ escaped_file=${escaped_file%EOF}
+
+ if [ -f "$file" ]; then
+ tgt_pkg shell "UPDATE config_files SET content = '$escaped_file' WHERE path = '/${1}';"
+ else
+ err "File ${file} not found"
+ fi
+}
+
# Run pkg(8) with the configured ABI, repo, and cache settings
pkg_cmd() {
pkg --repo-conf-dir "$(nano_pkg_repos_dir)" \
@@ -1232,6 +1251,8 @@
err "Regular expression pattern not found"
fi
[ -n "${NANO_NOPRIV_BUILD}" ] && chmod 444 etc/defaults/rc.conf
+ if $do_precompiled && [ -z "$NANO_NOPKGBASE" ]; then
+ fi
# Save config file for scripts
echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf
@@ -1505,6 +1526,9 @@
# Tell loader to use serial console early.
echo "${NANO_BOOT2CFG}" > ${NANO_WORLDDIR}/boot.config
tgt_touch boot.config
+
+ if $do_precompiled && [ -z "$NANO_NOPKGBASE" ]; then
+ fi
}
#######################################################################
@@ -1514,6 +1538,9 @@
cust_allow_ssh_root() {
sed -i "" -E 's/^#?PermitRootLogin.*/PermitRootLogin yes/' \
${NANO_WORLDDIR}/etc/ssh/sshd_config
+
+ if $do_precompiled && [ -z "$NANO_NOPKGBASE" ]; then
+ fi
}
#######################################################################
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Sep 1, 1:08 PM (1 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37028244
Default Alt Text
D58954.id184454.diff (1 KB)
Attached To
Mode
D58954: nanobsd: Synchronize target pkg database with image modifications
Attached
Detach File
Event Timeline
Log In to Comment