Page MenuHomeFreeBSD

D48788.id150331.diff
No OneTemporary

D48788.id150331.diff

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
@@ -304,6 +304,22 @@
done
)
+#
+# Switch the current root partition in the target file system tab.
+# Takes two arguments: the current, and the new partition.
+#
+tgt_switch_root_fstab()
+{
+ local current new
+ current="$1"
+ new="$2"
+
+ for f in ${NANO_WORLDDIR}/etc/fstab ${NANO_WORLDDIR}/conf/base/etc/fstab
+ do
+ sed -i "" "s=${NANO_DRIVE}${current}=${NANO_DRIVE}${new}=g" "${f}"
+ done
+}
+
# run in the world chroot, errors fatal
CR ( ) {
chroot "${NANO_WORLDDIR}" /bin/sh -exc "$*"

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 22, 11:29 AM (20 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31974304
Default Alt Text
D48788.id150331.diff (658 B)

Event Timeline