aboutsummaryrefslogtreecommitdiff
path: root/release/picobsd
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2002-03-11 05:54:22 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2002-03-11 05:54:22 +0000
commit5ea9adc715982fd18da40428c473fc41a6e64c22 (patch)
tree9528fc8ddc15b1e0845a2854470ea97a67d7401e /release/picobsd
parenta914eaada522e6abc8aaeb3132ec6696516f26bc (diff)
downloadsrc-5ea9adc715982fd18da40428c473fc41a6e64c22.tar.gz
src-5ea9adc715982fd18da40428c473fc41a6e64c22.zip
Fix detection of existing ssh host key, generate the new one
in floppy.tree instead of mfs_tree. Do not cleanup ${BUILDDIR}/floppy.tree, it might be useful to look at it after an image has been built.
Notes
Notes: svn path=/head/; revision=92063
Diffstat (limited to 'release/picobsd')
-rwxr-xr-xrelease/picobsd/build/picobsd24
1 files changed, 14 insertions, 10 deletions
diff --git a/release/picobsd/build/picobsd b/release/picobsd/build/picobsd
index cbfc2e160b82..573df420b5d9 100755
--- a/release/picobsd/build/picobsd
+++ b/release/picobsd/build/picobsd
@@ -162,13 +162,13 @@ create_includes_and_libraries() {
INCOWN=`id -un` BINOWN=`id -un` DESTDIR=${SRC}/.. \
make -m ${SRC}/share/mk \
-DNOHTML -DNOINFO -DNOMAN -DNOSHARE -DNOFSCHG "
- # need to 'make obj' in a few places. This is very
- # version-specific... The following works for 5.0
+ log "do a 'make obj' in a few places."
+ # This is very version-specific... The following works for 5.0
for i in lib secure/lib gnu/lib usr.sbin/pcvt/keycap \
gnu/usr.bin/perl usr.bin/lex usr.sbin/config ; do
(cd ${i}; eval $e obj)
done
- # now make the static libraries
+ log "now make the static libraries"
eval $e -DNOPROFILE -DNOPIC libraries
(cd ${SRC}/usr.sbin/config
eval $e # build binary
@@ -376,7 +376,7 @@ this as small as possible. " 10 70 2> ${c_reply} \
{ dialog --title "MFS bytes per inode:" --inputbox \
"Enter MFS bytes per inode (typically 4096..65536). \
A larger value means fewer inodes but more space on MFS" \
- 10 70 2> ${c_reply} && mfs_inodes=`cat ${c_reply}` ; } || true
+ 10 70 2> ${c_reply} && mfs_inodes=`cat ${c_reply}` ; } || true
;;
U)
@@ -494,6 +494,7 @@ populate_floppy_fs() { # OK
else
log "No site-specific floppy-tree"
fi
+
# gzip returns an error if it fails to compress some file
(cd $dst ; gzip -9 etc/*
log "Compressed files in etc/ `echo; ls -l etc`"
@@ -585,11 +586,14 @@ populate_mfs_tree() {
) || fail $? crunch
if [ -f ${dst}/stand/sshd ] ; then
- log "Creating host key for sshd"
- if [ -f ${dst}/etc/ssh_host_key ] ; then
+ log "Setting up host key for sshd:"
+ if [ -f ${BUILDDIR}/floppy.tree/etc/ssh_host_key.gz ] ; then
log "Using existing host key"
else
- ssh-keygen -f ${dst}/etc/ssh_host_key -N "" -C "root@picobsd"
+ log "Generating new host key"
+ ssh-keygen -f ${BUILDDIR}/floppy.tree/etc/ssh_host_key \
+ -N "" -C "root@picobsd"
+ gzip -9 ${BUILDDIR}/floppy.tree/etc/ssh_host_key* || true
fi
fi
@@ -598,7 +602,7 @@ populate_mfs_tree() {
if [ -d ${MFS_TREE} ] ; then
log "Copy ${MFS_TREE} ..."
(cd ${MFS_TREE} ; tar -cf - --exclude CVS . ) | \
- (cd ${dst} ; tar x${o_tarv}f - )
+ (cd ${dst} ; tar x${o_tarv}f - )
fi
done
@@ -769,7 +773,7 @@ fill_floppy_image() {
log "Newfs floppy image"
newfs -i ${fd_inodes} -m 0 -p 0 -o space -f 512 -b 4096 \
- /dev/${l_vndev}a > /dev/null
+ /dev/${l_vndev}a > /dev/null
log "Mounting floppy image"
mount /dev/${l_vndev}a ${dst}
@@ -804,7 +808,7 @@ fi
fi
)
(log "Fixing permissions"; cd ${dst}; chown -R root *)
- rm -rf ${BUILDDIR}/floppy.tree || true # cleanup
+ # rm -rf ${BUILDDIR}/floppy.tree || true # cleanup
df -ik ${dst} | colrm 70 > .build.reply
free_vnode