summaryrefslogtreecommitdiffstats
path: root/release/miscfuncs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'release/miscfuncs.sh')
-rw-r--r--release/miscfuncs.sh60
1 files changed, 44 insertions, 16 deletions
diff --git a/release/miscfuncs.sh b/release/miscfuncs.sh
index c2c45ec..0d2510e 100644
--- a/release/miscfuncs.sh
+++ b/release/miscfuncs.sh
@@ -10,9 +10,9 @@
# putting your name on top after doing something trivial like reindenting
# it, just to make it look like you wrote it!).
#
-# $Id: miscfuncs.sh,v 1.9 1994/11/21 07:33:21 jkh Exp $
+# $Id: miscfuncs.sh,v 1.10 1994/11/22 09:02:46 jkh Exp $
-if [ "$_MISCFUNCS_SH_LOADED_" = "yes" ]; then
+if [ "${_MISCFUNCS_SH_LOADED_}" = "yes" ]; then
return 0
else
_MISCFUNCS_SH_LOADED_=yes
@@ -22,7 +22,10 @@ PATH=/usr/bin:/usr/sbin:/bin:/sbin:/stand
export PATH
# Keep this current with the distribution!
-DISTNAME=2.0-RELEASE
+DISTNAME="2.0-RELEASE"
+
+# Express or Custom install?
+INSTALL_TYPE=""
# Flagrant guesses for now. These need to be hand-edited or, much better yet,
# automatically done as part of the release process. When that's the case,
@@ -39,6 +42,25 @@ SECRSIZE="4MB"
COMPATSIZE="3MB"
X11SIZE="50MB"
+# Paths
+ETC="/etc"
+MNT="/mnt"
+HOME=/; export HOME
+TMP=/tmp
+
+# Commands and flags
+FT_CMD= "ft"
+TAR_CMD= "tar"
+TAR_FLAGS= "--unlink -xvf"
+IFCONFIG_CMD= "ifconfig"
+ROUTE_CMD= "route"
+ROUTE_FLAGS= "add default"
+HOSTNAME_CMD= "hostname"
+SLATTACH_CMD= "slattach"
+SLATTACH_FLAGS= "-l -a -s"
+PPPD_CMD= "pppd"
+PPPD_FLAGS= "crtscts defaultroute -ip -mn netmask $netmask"
+
interrupt()
{
dialog --clear --title "User Interrupt Requested" \
@@ -63,50 +85,56 @@ handle_rval()
esac
}
+# stick a progress message out on the other vty
+progress()
+{
+ echo "Progress <$*>" > /dev/ttyv1
+}
+
# A simple user-confirmation dialog.
confirm()
{
- dialog $clear --title "User Confirmation" --msgbox "$*" -1 -1
+ dialog --title "User Confirmation" --msgbox "$*" -1 -1
}
# A simple message box dialog.
message()
{
- echo "Progress <$*>" > /dev/ttyv1
- dialog $clear --title "Progress" --infobox "$*" -1 -1
+ progress $*
+ dialog --title "Progress" --infobox "$*" -1 -1
}
# A simple error dialog.
error()
{
echo "ERROR <$*>" > /dev/ttyv1
- dialog $clear --title "Error!" --msgbox "$*" -1 -1
+ dialog --title "Error!" --msgbox "$*" -1 -1
}
# Something isn't supported yet! :-(
not_supported()
{
echo "<Feature not supported>" > /dev/ttyv1
- dialog $clear --title "Sorry!" \
- --msgbox "This feature is not supported in the current version of the \
-installation tools. Barring some sort of fatal accident, we do \
-expect it to be in the release. Please press RETURN to go on." -1 -1
+ dialog --title "Sorry!" --msgbox \
+"This feature is not supported in the current version of the
+installation tools. Barring some sort of fatal accident, we do
+expect it to be in a later release. Please press RETURN to go on." -1 -1
}
# Get a string from the user
input()
{
- title=${title-"User Input Required"}
- dialog $clear --title "$title" \
- --inputbox "$*" -1 -1 "$default_value" 2> ${TMP}/inputbox.tmp.$$
+ TITLE=${TITLE-"User Input Required"}
+ dialog --title "${TITLE}" \
+ --inputbox "$*" -1 -1 "${DEFAULT_VALUE}" 2> ${TMP}/inputbox.tmp.$$
if ! handle_rval $?; then rm -f ${TMP}/inputbox.tmp.$$; return 1; fi
- answer=`cat ${TMP}/inputbox.tmp.$$`
+ ANSWER=`cat ${TMP}/inputbox.tmp.$$`
rm -f ${TMP}/inputbox.tmp.$$
}
# Ask a networking question
network_dialog()
{
- title="Network Configuration"
+ TITLE="Network Configuration"
if ! input "$*"; then return 1; fi
}
OpenPOWER on IntegriCloud