git: eb544c63fc96 - main - nanobsd: Add uname/gname to the spec
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 17 Jan 2026 18:12:57 UTC
The branch main has been updated by jlduran:
URL: https://cgit.FreeBSD.org/src/commit/?id=eb544c63fc962d057df0c55497c648a6a869aacc
commit eb544c63fc962d057df0c55497c648a6a869aacc
Author: Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2026-01-17 18:03:26 +0000
Commit: Jose Luis Duran <jlduran@FreeBSD.org>
CommitDate: 2026-01-17 18:03:26 +0000
nanobsd: Add uname/gname to the spec
Also include the default NanoBSD uname/gname in the specification file.
By default, NANO_DEF_UNAME and NANO_DEF_GNAME map to root and wheel
respectively.
Reviewed by: imp, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48781
---
tools/tools/nanobsd/defaults.sh | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh
index 57be7a10f521..8d0c1e068048 100755
--- a/tools/tools/nanobsd/defaults.sh
+++ b/tools/tools/nanobsd/defaults.sh
@@ -257,7 +257,11 @@ tgt_touch() (
cd "${NANO_WORLDDIR}"
for i; do
touch $i
- echo "./${i} type=file" >> ${NANO_METALOG}
+ if [ -n "$NANO_METALOG" ]; then
+ echo "./${i} type=file" \
+ "uname=${NANO_DEF_UNAME} gname=${NANO_DEF_GNAME}" \
+ "mode=0644" >> "${NANO_METALOG}"
+ fi
done
)
@@ -275,7 +279,9 @@ tgt_dir2symlink() (
rm -xrf "$dir"
ln -s "$symlink" "$dir"
if [ -n "$NANO_METALOG" ]; then
- echo "./${dir} type=link mode=0777 link=${symlink}" >> ${NANO_METALOG}
+ echo "./${dir} type=link" \
+ "uname=${NANO_DEF_UNAME} gname=${NANO_DEF_GNAME}" \
+ "mode=0777 link=${symlink}" >> ${NANO_METALOG}
fi
)