|
Lines 82-87
Link Here
|
| 82 |
boot1=/boot/boot1 |
82 |
boot1=/boot/boot1 |
| 83 |
boot2=/boot/boot2 |
83 |
boot2=/boot/boot2 |
| 84 |
|
84 |
|
|
|
85 |
# interactive is if interactive mode should be used. |
| 86 |
interactive="YES" |
| 87 |
|
| 88 |
# install_interactive is if the confirmation for install of the |
| 89 |
# binary image on the floppy should be interactive |
| 90 |
install_interactive="YES" |
| 91 |
|
| 92 |
# verbose is if script should be verbose |
| 93 |
verbose="NO" |
| 94 |
|
| 85 |
# abort in case of error... |
95 |
# abort in case of error... |
| 86 |
set -e |
96 |
set -e |
| 87 |
|
97 |
|
|
Lines 90-99
Link Here
|
| 90 |
} |
100 |
} |
| 91 |
|
101 |
|
| 92 |
# log something on stdout if verbose. |
102 |
# log something on stdout if verbose. |
|
|
103 |
# and wait after each log if interactive |
| 93 |
log() { |
104 |
log() { |
| 94 |
if [ "$verbose" != "" ] ; then |
105 |
if [ "${verbose}" = "YES" ] ; then |
| 95 |
printf "%s\n" "$*" |
106 |
printf "%s\n" "$*" |
| 96 |
read -p "(log) enter to continue" foo |
107 |
if [ "${interactive}" = "YES" ]; then |
|
|
108 |
read -p "(log) enter to continue" foo |
| 109 |
fi |
| 97 |
fi |
110 |
fi |
| 98 |
} |
111 |
} |
| 99 |
|
112 |
|
|
Lines 307-324
Link Here
|
| 307 |
# Call the build procedure |
320 |
# Call the build procedure |
| 308 |
# Install image |
321 |
# Install image |
| 309 |
do_install() { |
322 |
do_install() { |
| 310 |
dialog --title "Build ${TYPE} completed" --inputbox \ |
323 |
local text_common text_interactive text_noninteractive |
| 311 |
"\nThe build process was completed successfuly.\n\ |
324 |
|
|
|
325 |
abort_time=10 |
| 326 |
|
| 327 |
text_common="\nThe build process was completed successfuly.\n\ |
| 312 |
`cat .build.reply` \n\n\ |
328 |
`cat .build.reply` \n\n\ |
| 313 |
Now we are going to install the image on the floppy.\n\ |
329 |
Now we are going to install the image on the floppy.\n\ |
| 314 |
Please insert a blank floppy in /dev/fd0.\\n |
330 |
Please insert a blank floppy in /dev/fd0.\n\n\ |
| 315 |
WARNING: the contents of the floppy will be permanently erased!\n\ |
331 |
WARNING: the contents of the floppy will be permanently erased!\n\n" |
| 316 |
\n\ |
332 |
|
| 317 |
Your options:\n\ |
333 |
text_interactive="Your options:\n\ |
| 318 |
* ^C or [Cancel] to abort,\n\ |
334 |
* ^C or [Cancel] to abort,\n\ |
| 319 |
* Enter to install \"picobsd.bin\",\n\ |
335 |
* Enter to install \"picobsd.bin\",\n\ |
| 320 |
" 20 80 2> ${RISU} |
336 |
" |
| 321 |
if [ "$?" = "0" ]; then |
337 |
|
|
|
338 |
text_noninteractive="You have ${abort_time} to abort by pressing ^C\n" |
| 339 |
|
| 340 |
if [ ${install_interactive} = "YES" ]; then |
| 341 |
dialog --title "Build ${TYPE} completed" --inputbox \ |
| 342 |
"${text_common}${text_interactive}" 20 80 2> ${RISU} |
| 343 |
else |
| 344 |
echo -e "\n\n\n${text_common}${text_noninteractive}" |
| 345 |
sleep ${abort_time} |
| 346 |
fi |
| 347 |
|
| 348 |
if [ "$?" = "0" -o "${install_interactive}" = "NO" ]; then |
| 322 |
echo "Writing picobsd.bin..." |
349 |
echo "Writing picobsd.bin..." |
| 323 |
dd if=${BUILDDIR}/picobsd.bin of=/dev/rfd0.${FLOPPY_SIZE} |
350 |
dd if=${BUILDDIR}/picobsd.bin of=/dev/rfd0.${FLOPPY_SIZE} |
| 324 |
else |
351 |
else |
|
Lines 512-518
Link Here
|
| 512 |
ssh-keygen -f ${MFS_MOUNTPOINT}/etc/ssh_host_key -N "" -C "root@picobsd" |
539 |
ssh-keygen -f ${MFS_MOUNTPOINT}/etc/ssh_host_key -N "" -C "root@picobsd" |
| 513 |
fi |
540 |
fi |
| 514 |
|
541 |
|
| 515 |
if [ -d ${MY_TREE}/mfs_tree ]; then |
542 |
if [ -d ${MY_TREE}/mfs_tree -a ${MERGE_TYPE_SPECIFIC_MFS} = "no" ]; then |
| 516 |
log "---> Copy site-specific MFS tree..." |
543 |
log "---> Copy site-specific MFS tree..." |
| 517 |
MFS_TREE=${MY_TREE}/mfs_tree |
544 |
MFS_TREE=${MY_TREE}/mfs_tree |
| 518 |
else |
545 |
else |
|
Lines 522-527
Link Here
|
| 522 |
(cd ${MFS_TREE} ; tar -cf - --exclude CVS . ) | \ |
549 |
(cd ${MFS_TREE} ; tar -cf - --exclude CVS . ) | \ |
| 523 |
(cd ${MFS_MOUNTPOINT} ; tar x${TAR_VERBOSE}f - ) |
550 |
(cd ${MFS_MOUNTPOINT} ; tar x${TAR_VERBOSE}f - ) |
| 524 |
|
551 |
|
|
|
552 |
# Now merge in type specific MFS if requested |
| 553 |
if [ -d ${MY_TREE}/mfs_tree -a ${MERGE_TYPE_SPECIFIC_MFS} = "yes" ]; then |
| 554 |
log "---> Merging type-specific MFS tree..." |
| 555 |
MFS_TREE=${MY_TREE}/mfs_tree |
| 556 |
|
| 557 |
(cd ${MFS_TREE} ; tar -cf - --exclude CVS . ) | \ |
| 558 |
(cd ${MFS_MOUNTPOINT} ; tar x${TAR_VERBOSE}f - ) |
| 559 |
fi |
| 560 |
|
| 525 |
if [ "${INCLUDE_FLOPPY_IN_MFS}" = "yes" ]; then |
561 |
if [ "${INCLUDE_FLOPPY_IN_MFS}" = "yes" ]; then |
| 526 |
log "---> Copy generic floppy_tree into MFS..." |
562 |
log "---> Copy generic floppy_tree into MFS..." |
| 527 |
cp -Rp ${BUILDDIR}/floppy.tree/* ${MFS_MOUNTPOINT}/fd |
563 |
cp -Rp ${BUILDDIR}/floppy.tree/* ${MFS_MOUNTPOINT}/fd |
|
Lines 658-664
Link Here
|
| 658 |
shift |
694 |
shift |
| 659 |
;; |
695 |
;; |
| 660 |
-n) |
696 |
-n) |
|
|
697 |
# If -n i specified two times also set install_interactive to no |
| 698 |
if [ "${interactive}" = "NO" ]; then |
| 699 |
install_interactive="NO" |
| 700 |
fi |
| 701 |
interactive="NO" |
| 702 |
;; |
| 703 |
-nn) |
| 661 |
interactive="NO" |
704 |
interactive="NO" |
|
|
705 |
install_interactive="NO" |
| 662 |
;; |
706 |
;; |
| 663 |
-c*) # clean |
707 |
-c*) # clean |
| 664 |
clean="YES" |
708 |
clean="YES" |