diff options
author | dwhite <dwhite@FreeBSD.org> | 1999-10-11 20:52:50 +0000 |
---|---|---|
committer | dwhite <dwhite@FreeBSD.org> | 1999-10-11 20:52:50 +0000 |
commit | ad345ff4e48d2901b73537f49e6a7a5fb98d61dd (patch) | |
tree | 54989966a54442db29b214907d47a4b0ec51b377 /release/picobsd | |
parent | fd8b4427a5a052988cfb0778b779cff1a3e09628 (diff) | |
download | FreeBSD-src-ad345ff4e48d2901b73537f49e6a7a5fb98d61dd.zip FreeBSD-src-ad345ff4e48d2901b73537f49e6a7a5fb98d61dd.tar.gz |
Fix handling of the 'custom' directory symlink.
Properly abstract the PicoBSD build directory instead of depending too much
on pwd's and relative paths.
Submitted by: John Baldwin <jobaldwi@vt.edu>
Diffstat (limited to 'release/picobsd')
-rwxr-xr-x | release/picobsd/build/build | 9 | ||||
-rwxr-xr-x | release/picobsd/build/stage1 | 14 |
2 files changed, 14 insertions, 9 deletions
diff --git a/release/picobsd/build/build b/release/picobsd/build/build index d5d3952..6f9f71a 100755 --- a/release/picobsd/build/build +++ b/release/picobsd/build/build @@ -33,6 +33,10 @@ set -e . ../Version +# support symbolically linked custom directory +BUILDDIR=`pwd` +export BUILDDIR + # assign default values to variables. set_defaults() { TYPE=${TYPE:-dial} # PicoBSD type (isp, router, net, custom, ... @@ -90,7 +94,7 @@ main() { # Build the kernel, if necessary echo "" echo "-> Checking if we have to build the PICOBSD kernel..." - (cd ../${TYPE}; make -f ../build/Makefile.conf ) + (cd ../${TYPE}; make -f ${BUILDDIR}/Makefile.conf ) echo "" ./stage1 @@ -122,6 +126,7 @@ check_for_old_custom() { CUSTOMLINK=`ls -l ../custom | awk -F\> '{ print $2 }' | awk '{ print $1 }'` if dialog --title "Custom directory setup" --yesno "A custom configuration\n ${CUSTOMLINK}\nalready exists. Would you like to use it?" 7 50 ; then KEEP_CUSTOM=yes + CUST_DIR=${CUSTOMLINK} else KEEP_CUSTOM=no fi @@ -337,7 +342,7 @@ WARNING: the contents of the floppy will be permanently erased!\n\ \n\ Your options:\n\ * ^C or [Cancel] to abort,\n\ - * Enter to install \"${FILENAME}\",\n\ + * Enter to install \"picobsd.bin\",\n\ * name of other file to install.\n\ " 20 70 2> ${RISU} if [ "$?" = "0" ]; then diff --git a/release/picobsd/build/stage1 b/release/picobsd/build/stage1 index 31e9a34..8913f6e 100755 --- a/release/picobsd/build/stage1 +++ b/release/picobsd/build/stage1 @@ -92,7 +92,7 @@ fi MFS_RC=floppy.tree/etc/mfs.rc if [ ! -f ${MFS_RC} ] ; then # no private version. use generic mfs.rc - MFS_RC=../${MFS_RC} + MFS_RC=${BUILDDIR}/../${MFS_RC} fi if [ "${INIT}" = "oinit" ] ; then cat ${MFS_RC} | sed -e "s/@VER@/${VER}/g" > /mnt/etc/oinit.rc @@ -101,7 +101,7 @@ else if [ -f floppy.tree/etc/mfs.login.conf ] ; then cp floppy.tree/etc/mfs.login.conf /mnt/etc/login.conf else - cp ../floppy.tree/etc/mfs.login.conf /mnt/etc/login.conf + cp ${BUILDDIR}/../floppy.tree/etc/mfs.login.conf /mnt/etc/login.conf fi cat lang/README.${LANGUAGE} | sed -e "s/@VER@/${VER}/g" > /mnt/README fi @@ -178,7 +178,7 @@ mount /dev/vn0c /mnt echo "-> Populating floppy filesystem..." ### copy floppy tree excluding private files. -excl=../${TYPE}/floppy.tree.exclude +excl=${BUILDDIR}/../${TYPE}/floppy.tree.exclude if [ -f ${excl} ] ; then excl="--exclude-from ${excl}" echo "Exclude following files from ${excl}:\n===" @@ -187,17 +187,17 @@ if [ -f ${excl} ] ; then else excl="" fi -(cd ../floppy.tree ; tar -cf - ${excl} . ) | (cd /mnt ; tar xvf - ) +(cd ${BUILDDIR}/../floppy.tree ; tar -cf - ${excl} . ) | (cd /mnt ; tar xvf - ) -if [ -d ../${TYPE}/floppy.tree ] ; then +if [ -d ${BUILDDIR}/../${TYPE}/floppy.tree ] ; then echo "-> update with private files:" - (cd ../${TYPE}/floppy.tree ; tar cf - . ) | (cd /mnt ; tar xvf - ) + (cd ${BUILDDIR}/../${TYPE}/floppy.tree ; tar cf - . ) | (cd /mnt ; tar xvf - ) fi files="hosts motd" echo "-> Copying language dependent files: ${files} -> /mnt/etc ..." for i in ${files} ; do - cat ../${TYPE}/lang/${i}.${LANGUAGE} | \ + cat ${BUILDDIR}/../${TYPE}/lang/${i}.${LANGUAGE} | \ sed -e "s/@VER@/${VER}/g" > /mnt/etc/${i} done |