Page MenuHomeFreeBSD

D59166.id184948.diff
No OneTemporary

D59166.id184948.diff

diff --git a/tools/tools/nanobsd/dhcpd/common b/tools/tools/nanobsd/dhcpd/common
--- a/tools/tools/nanobsd/dhcpd/common
+++ b/tools/tools/nanobsd/dhcpd/common
@@ -34,6 +34,8 @@
# NB: You want the other file
+legacy
+
NANO_PMAKE="make -j $(sysctl -n hw.ncpu)"
NANO_CFG_BASE=$(pwd)
diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh
--- a/tools/tools/nanobsd/legacy.sh
+++ b/tools/tools/nanobsd/legacy.sh
@@ -27,6 +27,8 @@
#
#
+NANO_PLAN=legacy
+
# Media geometry, only relevant if bios doesn't understand LBA.
[ -n "$NANO_SECTS" ] || NANO_SECTS=63
[ -n "$NANO_HEADS" ] || NANO_HEADS=16
@@ -243,7 +245,7 @@
# Calculate MBR partition layout (start offset, size, index)
# from media/image/code/conf/data sizes
#
-calculate_partitioning() {
+is_defined calculate_partitioning || calculate_partitioning() {
echo $NANO_MEDIASIZE $NANO_IMAGES \
$NANO_SECTS $NANO_HEADS \
$NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE |
@@ -405,7 +407,7 @@
# Assemble a full MBR disk image using mdconfig and gpart,
# write all partitions (root, altroot, cfg, data) via live mounts
#
-create_diskimage() {
+is_defined create_diskimage || create_diskimage() {
pprint 2 "build diskimage"
pprint 3 "log: ${NANO_OBJ}/_.di"
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh
--- a/tools/tools/nanobsd/nanobsd.sh
+++ b/tools/tools/nanobsd/nanobsd.sh
@@ -68,9 +68,6 @@
do_precompiled=false
do_prep_image=true
-# Pull in legacy stuff for now automatically
-. "${topdir}/legacy.sh"
-
set +e
args=$(getopt BKXWbc:fhiIknPpqUvw $*)
if [ $? -ne 0 ]; then
@@ -183,6 +180,10 @@
usage
fi
+# Transition hack -- If you get this warning, add 'legacy' to your nano config file
+[ -n "$NANO_PLAN" ] || echo "Warning: no plan defined, assuming legacy config."
+[ -n "$NANO_PLAN" ] || legacy
+
#######################################################################
# And then it is as simple as that...
diff --git a/tools/tools/nanobsd/pcengines/common.conf b/tools/tools/nanobsd/pcengines/common.conf
--- a/tools/tools/nanobsd/pcengines/common.conf
+++ b/tools/tools/nanobsd/pcengines/common.conf
@@ -1,6 +1,8 @@
#
#
+legacy
+
NANO_SRC=$(pwd)
NANO_SRC=${NANO_SRC%/tools/tools/nanobsd/pcengines}
NANO_OBJ=${NANO_SRC}/../nanobsd-builds/${NANO_NAME}/obj
diff --git a/tools/tools/nanobsd/rescue/common b/tools/tools/nanobsd/rescue/common
--- a/tools/tools/nanobsd/rescue/common
+++ b/tools/tools/nanobsd/rescue/common
@@ -1,5 +1,7 @@
#!/bin/sh
+legacy
+
#NANO_SRC=$(pwd)
#NANO_SRC=${NANO_SRC%/tools/tools/nanobsd/rescue}
#NANO_OBJ=${NANO_SRC}/../nanobsd-builds/${NANO_NAME}/obj

File Metadata

Mime Type
text/plain
Expires
Sun, Aug 30, 1:51 AM (10 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37280797
Default Alt Text
D59166.id184948.diff (2 KB)

Event Timeline