Annotation of /trunk/installer/guification.sh
Parent Directory | Revision Log
Revision 719 -
(hide annotations)
(download)
(as text)
Fri Apr 18 20:40:28 2008 UTC (16 years, 6 months ago) by niro
File MIME type: application/x-sh
File size: 3305 byte(s)
Fri Apr 18 20:40:28 2008 UTC (16 years, 6 months ago) by niro
File MIME type: application/x-sh
File size: 3305 byte(s)
-first import
1 | niro | 719 | #! /bin/bash |
2 | # $Header: /home/cvsd/magellan-cvs/magellan-src/installer/guification.sh,v 1.1 2008-04-18 20:40:28 niro Exp $ | ||
3 | |||
4 | # helper scripts | ||
5 | source hwdetection.sh | ||
6 | |||
7 | # gui | ||
8 | source gtk-gui/common.sh | ||
9 | source gtk-gui/locales.sh | ||
10 | source gtk-gui/networking.sh | ||
11 | source gtk-gui/diskpartition.sh | ||
12 | source gtk-gui/usermanagement.sh | ||
13 | |||
14 | # setup if needed sudo | ||
15 | sudo="" | ||
16 | if [[ $(id -u) != 0 ]] | ||
17 | then | ||
18 | SUDO=yes | ||
19 | export sudo="sudo" | ||
20 | fi | ||
21 | |||
22 | rundialog() | ||
23 | { | ||
24 | local i | ||
25 | |||
26 | eval $(gtkdialog --program="$1") | ||
27 | |||
28 | # # export retvals automatically without RETVAL_ tag | ||
29 | # for i in $(set | grep RETVAL_ | cut -d= -f1) | ||
30 | # do | ||
31 | # export $(echo ${i} | sed "s:RETVAL_::") | ||
32 | # done | ||
33 | } | ||
34 | export -f rundialog | ||
35 | |||
36 | #### Helpers #### | ||
37 | ## | ||
38 | ## <text> -> center | ||
39 | ## <text xalign=0> -> left | ||
40 | ## <text xalign=2> -> right | ||
41 | ## | ||
42 | ## <list selection-mode="0"> -> no selection allowed; only default value | ||
43 | ## <list selection-mode="1"> -> only one item can be selected; unselect allowed | ||
44 | ## <list selection-mode="2"> -> only one item can be selected; no unselect allowed | ||
45 | ## <list selection-mode="3"> -> multiple selections allowed | ||
46 | ## | ||
47 | ################# | ||
48 | |||
49 | |||
50 | ################################# | ||
51 | #### Guification starts here #### | ||
52 | ################################# | ||
53 | |||
54 | # start Xnest | ||
55 | Xnest :2 -ac -geometry 800x600 +kb & | ||
56 | # or start a full X11 | ||
57 | #X :2 & | ||
58 | export DISPLAY=:2 | ||
59 | |||
60 | # start openbox as windowmanager | ||
61 | export XDG_CONFIG_DIR=/etc/xdg | ||
62 | export XDG_DATA_DIR=/usr/share | ||
63 | sleep 1 | ||
64 | exec openbox & | ||
65 | |||
66 | |||
67 | # set a reasonable background | ||
68 | sleep 0.1; fbsetbg -f background.png | ||
69 | |||
70 | |||
71 | # start the program | ||
72 | rundialog WELCOME | ||
73 | # | ||
74 | main_locales | ||
75 | echo "DEBUG: TIMEZONE_REGION='${TIMEZONE_REGION}'" | ||
76 | echo "DEBUG: TIMEZONE_LOCATION='${TIMEZONE_LOCATION}'" | ||
77 | echo "DEBUG: LOCALE_ALL='${LOCALE_ALL}'" | ||
78 | echo "DEBUG: LOCALE='${LOCALE}'" | ||
79 | |||
80 | main_networking | ||
81 | echo "DEBUG: NETWORK_HOSTNAME='${NETWORK_HOSTNAME}'" | ||
82 | echo "DEBUG: NETWORK_DOMAIN='${NETWORK_DOMAIN}'" | ||
83 | echo "DEBUG: NETWORK_NIC='${NETWORK_NIC}'" | ||
84 | echo "DEBUG: NETWORK_METHOD='${NETWORK_METHOD}'" | ||
85 | echo "DEBUG: NETWORK_IP='${NETWORK_IP}'" | ||
86 | echo "DEBUG: NETWORK_NETMASK='${NETWORK_NETMASK}'" | ||
87 | echo "DEBUG: NETWORK_GATEWAY='${NETWORK_GATEWAY}'" | ||
88 | echo "DEBUG: NETWORK_NAMESERVER='${NETWORK_NAMESERVER}'" | ||
89 | |||
90 | main_diskpartition | ||
91 | echo "DEBUG: PARTITION_DISK_SETUP='${PARTITION_DISK_SETUP}'" | ||
92 | echo "DEBUG: PARTITION_DISK_ROOT='${PARTITION_DISK_ROOT}'" | ||
93 | echo "DEBUG: PARTITION_FS_ROOT='${PARTITION_FS_ROOT}'" | ||
94 | echo "DEBUG: PARTITION_DISK_BOOT='${PARTITION_DISK_BOOT}'" | ||
95 | echo "DEBUG: PARTITION_FS_BOOT='${PARTITION_DISK_BOOT}'" | ||
96 | echo "DEBUG: PARTITION_DISK_HOME='${PARTITION_DISK_HOME}'" | ||
97 | echo "DEBUG: PARTITION_FS_HOME='${PARTITION_FS_HOME}'" | ||
98 | echo "DEBUG: PARTITION_DISK_TMP='${PARTITION_DISK_TMP}'" | ||
99 | echo "DEBUG: PARTITION_FS_TMP='${PARTITION_FS_TMP}'" | ||
100 | echo "DEBUG: PARTITION_DISK_USER='${PARTITION_DISK_USER}'" | ||
101 | echo "DEBUG: PARTITION_FS_USER='${PARTITION_FS_USER}'" | ||
102 | echo "DEBUG: PARTITION_DISK_VAR='${PARTITION_DISK_VAR}'" | ||
103 | echo "DEBUG: PARTITION_FS_VAR='${PARTITION_FS_VAR}'" | ||
104 | echo "DEBUG: PARTITION_DISK_SVR='${PARTITION_DISK_SVR}'" | ||
105 | echo "DEBUG: PARTITION_FS_SVR='${PARTITION_FS_SVR}'" | ||
106 | echo "DEBUG: PARTITION_DISK_OPT='${PARTITION_DISK_OPT}'" | ||
107 | echo "DEBUG: PARTITION_FS_OPT='${PARTITION_FS_OPT}'" | ||
108 | echo "DEBUG: PARTITION_DISK_SWAP='${PARTITION_DISK_SWAP}'" | ||
109 | |||
110 | main_usermanagement | ||
111 | echo "DEBUG: ROOT_PASSWORD='${ROOT_PASSWORD}'" | ||
112 | echo "DEBUG: USER_NAME='${USER_NAME}'" | ||
113 | echo "DEBUG: USER_PASSWORD='${USER_PASSWORD}'" | ||
114 | |||
115 | exit 0 |
Properties
Name | Value |
---|---|
svn:executable | * |