Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150979148
D47502.id146293.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D47502.id146293.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
@@ -571,13 +571,42 @@
# create diskless marker file
touch etc/diskless
- [ -n "${NANO_NOPRIV_BUILD}" ] && chmod 666 etc/defaults/rc.conf
-
- # Make root filesystem R/O by default
- echo "root_rw_mount=NO" >> etc/defaults/rc.conf
- # Disable entropy file, since / is read-only /var/db/entropy should be enough?
- echo "entropy_file=NO" >> etc/defaults/rc.conf
+ [ -n "${NANO_NOPRIV_BUILD}" ] && chmod 666 boot/defaults/loader.conf
+ {
+ echo
+ echo '### NanoBSD configuration ##################################'
+ echo 'hostuuid_load="NO"'
+ echo 'entropy_cache_load="NO" # Disable loading cached entropy at boot time.'
+ echo 'kern.random.initial_seeding.disable_bypass_warnings="1" # Do not log a warning'
+ echo " # if the 'bypass_before_seeding' knob is enabled"
+ echo " # and a request is submitted prior to initial"
+ echo " # seeding."
+ } >> boot/defaults/loader.conf
+ [ -n "${NANO_NOPRIV_BUILD}" ] && chmod 444 boot/defaults/loader.conf
+ [ -n "${NANO_NOPRIV_BUILD}" ] && chmod 666 etc/defaults/rc.conf
+ if ! ed -s etc/defaults/rc.conf <<\EOF
+/^### Define source_rc_confs, the mechanism used by \/etc\/rc\.\* ##$/i
+### NanoBSD options ########################################
+##############################################################
+
+kldxref_enable="NO" # Disable building linker.hints files with kldxref(8).
+root_rw_mount="NO" # Inhibit remounting root read-write.
+entropy_boot_file="NO" # Disable very early (used at early boot time)
+ # entropy caching through reboots.
+entropy_file="NO" # Disable late (used when going multi-user)
+ # entropy through reboots.
+entropy_dir="NO" # Disable caching entropy via cron.
+
+##############################################################
+.
+w
+q
+EOF
+ then
+ echo "Regular expression pattern not found"
+ exit 2
+ fi
[ -n "${NANO_NOPRIV_BUILD}" ] && chmod 444 etc/defaults/rc.conf
# save config file for scripts
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 6:58 AM (4 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30913553
Default Alt Text
D47502.id146293.diff (2 KB)
Attached To
Mode
D47502: nanobsd: Avoid read-only file system warnings
Attached
Detach File
Event Timeline
Log In to Comment