diff options
author | luigi <luigi@FreeBSD.org> | 2002-03-21 03:15:06 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2002-03-21 03:15:06 +0000 |
commit | 32cb7030ba723d5620083585ecc9103ca5503252 (patch) | |
tree | c6e24f3bd4c5ee3f4de3e40d513bbeff7050ce39 /release/picobsd | |
parent | d30ab954784b833f48676216a1ae4d1f3b277782 (diff) | |
download | FreeBSD-src-32cb7030ba723d5620083585ecc9103ca5503252.zip FreeBSD-src-32cb7030ba723d5620083585ecc9103ca5503252.tar.gz |
Gracefully exit when no MFS signature is found in the kernel.
Add support for a new "import_files" option (see manpage for details).
Diffstat (limited to 'release/picobsd')
-rwxr-xr-x | release/picobsd/build/picobsd | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/release/picobsd/build/picobsd b/release/picobsd/build/picobsd index 573df42..04ff918 100755 --- a/release/picobsd/build/picobsd +++ b/release/picobsd/build/picobsd @@ -641,6 +641,16 @@ __EOF log "Fixing permissions" (cd ${dst}; chown -R root . ) + if [ -n "${import_files}" ] ; then + log "importing ${import_files} into mfs" + # We do it in a chroot environment on the target so + # symlinks are followed correctly. + cp `which tar` ${dst}/my_copy_of_tar + (cd ${l_usrtree}/.. ; tar cf - ${import_files} ) | \ + (chroot ${dst} /my_copy_of_tar xf - ) + rm ${dst}/my_copy_of_tar + fi + if [ "${early_mfs_mount}" != "1" ] ; then create_mfs log "Copy mfs tree into file" @@ -707,6 +717,9 @@ fail() { no_space) echo "Error: no space left on device (${where})" ;; + no_mfs) + echo "Error: while writing MFS into the kernel." + ;; "") echo "User break" errcode="userbreak" @@ -787,7 +800,7 @@ if [ true ] ; then else cc -o wmk ${PICO_TREE}/../write_mfs_in_kernel.c fi - ./wmk kernel ${c_fs} + ./wmk kernel ${c_fs} || fail $? no_mfs rm wmk else # not working yet, just a reminder objdump -h kernel |