config_query START_ON_BOOT "Start mgetty on system boot? " y if [ $START_ON_BOOT == "y" ] ;then ## Set the TTY device to be used for mgetty. if ! [ -e /dev/ttyS0 ]; then message "${PROBLEM_COLOR}No serail port available. Fix your BIOS or kernel.${DEFAULT_COLOR}" return 1 fi local COUNTER TTY_DEVICE COUNTER=0 while [ "${TTY_DEVICE}" == "" ]; do message "${MESSAGE_COLOR}The following questions will setup the device to use ${SPELL_COLOR}mgetty${DEFAULT_COLOR}${MESSAGE_COLOR} on:${DEFAULT_COLOR}" for TTY_DEVICE in `ls ${INSTALL_ROOT}/dev/ttyS*`; do if [[ $COUNTER -gt 2 ]]; then if query "Use ${TTY_DEVICE} for the mgetty device? " y; then echo "TTY_DEVICE=${TTY_DEVICE}" >> ${SPELL_CONFIG} break else unset TTY_DEVICE fi else if query "Use ${TTY_DEVICE} for the mgetty device? " n; then echo "TTY_DEVICE=${TTY_DEVICE}" >> ${SPELL_CONFIG} break else unset TTY_DEVICE fi fi done let "COUNTER += 1" done ############################################################ config_query NUM_RINGS "number of rings to answer on" 2 ############################################################ # Setup final init string persistent_add INITTAB_STRING INITTAB_STRING="${TTY_DEVICE:5}:linux:${INSTALL_ROOT}/usr/sbin/mgetty -n ${NUM_RINGS} ${TTY_DEVICE}" fi #boot ############################################################ ## Select the options to enable. config_query LOGIN_PATCH " Apply login prompt and login timeout patch? " y config_query NEWFAX_PATCH "run new_fax script for every new faxed received?" n ############################################################ ## Select the optional programs to install. config_query INCLUDE_CALLBACK "Install the included callback utility? " n config_query INCLUDE_SAMPLES "Install the included samples? " n config_query INCLUDE_TOOLS "Install the misc. tools (cutbl, kvg, ltest and mid)? " y config_query INCLUDE_VGETTY "Install vgetty to add voice mail capabilities? " y config_query INCLUDE_VIEWFAX "X-based fax viewer?" n config_query INCLUDE_TCLTK "tcl/tk-based fax viewer?" n config_query INCLUDE_DIALOG "view the fax queue and to listen to voice messages" n