aboutsummaryrefslogtreecommitdiff
path: root/release/scripts/setup.sh
blob: e692809bb0222b09751fdc1fddbced92b38fa816 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/stand/sh
#
# bininst - perform the last stage of installation by somehow getting
# a bindist onto the user's disk and unpacking it.  The name bininst
# is actually something of a misnomer, since this utility will install
# more than just the bindist set.
#
# Written:  November 11th, 1994
# Copyright (C) 1994 by Jordan K. Hubbard
#
# Permission to copy or use this software for any purpose is granted
# provided that this message stay intact, and at this location (e.g. no
# putting your name on top after doing something trivial like reindenting
# it, just to make it look like you wrote it!).
#
# $Id: setup.sh,v 1.1 1995/01/14 13:34:37 jkh Exp $

if [ "${_SETUP_LOADED_}" = "yes" ]; then
        error "Error, $0 loaded more than once!"
        return 1
else
        _SETUP_LOADED_=yes
fi

# Grab the miscellaneous functions.
. /stand/scripts/miscfuncs.sh

setup()
{
	DONE=""
	while [ "${DONE}" = "" ]; do
	dialog --title "Configuration Menu" --menu \
"Configure your system for basic single user, network or\n\
development workstation usage.  Please select one of the
following options.  When you are finished setting up your\n\
system, select \"done\".  To invoke this configuration tool \n\
again, type \`/stand/scripts/setup.sh\'." -1 -1 5 \
"help" "Help!  What does all this mean?" \
"tzsetup" "Configure your system's time zone" \
"network" "Configure basic networking parameters" \
"user" "Add a user name for yourself to the system" \
"guest" "Add a default user \"guest\" \
"packages" "Install additional optional software on your system." \
"ports" "Enable use of the ports collection from CD or fileserver." \
"done" "Exit from setup." 2> ${TMP}/menu.tmp.$$
	RETVAL=$?
	CHOICE=`cat ${TMP}/menu.tmp.$$`
	rm -f ${TMP}/menu.tmp.$$
	if ! handle_rval ${RETVAL}; then exit 0; fi

	case ${CHOICE} in
	tzsetup)
		dialog --clear
		sh /stand/tzsetup
		dialog --clear
	;;

	network)
		network_setup
	;;

	user)
		sh /stand/scripts/adduser.sh -i
	;;

	guest)
		sh /stand/scripts/adduser.sh
	;;

	done)
		DONE="yes"
	;;

	*)
		not_supported	
	esac
	done
}