Magellan Linux

Annotation of /trunk/installer/guification.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1034 - (hide annotations) (download) (as text)
Sun May 30 18:29:43 2010 UTC (13 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 3962 byte(s)
-added ncurses-gui
1 niro 719 #! /bin/bash
2 niro 1015 # $Id$
3 niro 719
4 niro 1034 # global config
5     source /etc/installer.conf
6    
7 niro 719 # helper scripts
8 niro 1034 source ${INSTALLER_DIR}/include/functions.sh
9     source ${INSTALLER_DIR}/include/hwdetection.sh
10 niro 719
11     # gui
12 niro 1034 source ${INSTALLER_DIR}/gtk-gui/common.sh
13     source ${INSTALLER_DIR}/gtk-gui/locales.sh
14     source ${INSTALLER_DIR}/gtk-gui/networking.sh
15     source ${INSTALLER_DIR}/gtk-gui/diskpartition.sh
16     source ${INSTALLER_DIR}/gtk-gui/usermanagement.sh
17     source ${INSTALLER_DIR}/gtk-gui/install.sh
18 niro 719
19 niro 768 # install root
20     INSTALL_ROOT="/mnt/magellan"
21    
22 niro 719 # setup if needed sudo
23     sudo=""
24     if [[ $(id -u) != 0 ]]
25     then
26     SUDO=yes
27     export sudo="sudo"
28     fi
29    
30     rundialog()
31     {
32     local i
33    
34     eval $(gtkdialog --program="$1")
35    
36     # # export retvals automatically without RETVAL_ tag
37     # for i in $(set | grep RETVAL_ | cut -d= -f1)
38     # do
39     # export $(echo ${i} | sed "s:RETVAL_::")
40     # done
41     }
42     export -f rundialog
43    
44     #### Helpers ####
45     ##
46     ## <text> -> center
47     ## <text xalign=0> -> left
48     ## <text xalign=2> -> right
49     ##
50     ## <list selection-mode="0"> -> no selection allowed; only default value
51     ## <list selection-mode="1"> -> only one item can be selected; unselect allowed
52     ## <list selection-mode="2"> -> only one item can be selected; no unselect allowed
53     ## <list selection-mode="3"> -> multiple selections allowed
54     ##
55     #################
56    
57    
58     #################################
59     #### Guification starts here ####
60     #################################
61    
62 niro 768 # # # start Xnest
63     # # Xnest :2 -ac -geometry 800x600 +kb &
64     # # # or start a full X11
65     # # #X :2 &
66     # # export DISPLAY=:2
67     # #
68     # # # start openbox as windowmanager
69     # # export XDG_CONFIG_DIR=/etc/xdg
70     # # export XDG_DATA_DIR=/usr/share
71     # # sleep 1
72     # # exec openbox &
73 niro 719
74    
75     # set a reasonable background
76 niro 1034 sleep 0.1; fbsetbg -f ${INSTALLER_DIR}/data/background.png
77 niro 719
78 niro 1034 # change into ${INSTALLER_DIR} to simplify gtkdialogs includes
79     pushd ${INSTALLER_DIR}
80 niro 719
81     # start the program
82     rundialog WELCOME
83     #
84     main_locales
85 niro 1015 debug "RECEIVED: TIMEZONE_REGION='${TIMEZONE_REGION}'"
86     debug "RECEIVED: TIMEZONE_LOCATION='${TIMEZONE_LOCATION}'"
87     debug "RECEIVED: LOCALE_ALL='${LOCALE_ALL}'"
88     debug "RECEIVED: LOCALE='${LOCALE}'"
89 niro 719
90     main_networking
91 niro 1015 debug "RECEIVED: NETWORK_HOSTNAME='${NETWORK_HOSTNAME}'"
92     debug "RECEIVED: NETWORK_DOMAIN='${NETWORK_DOMAIN}'"
93     debug "RECEIVED: NETWORK_NIC='${NETWORK_NIC}'"
94     debug "RECEIVED: NETWORK_METHOD='${NETWORK_METHOD}'"
95     debug "RECEIVED: NETWORK_IP='${NETWORK_IP}'"
96     debug "RECEIVED: NETWORK_NETMASK='${NETWORK_NETMASK}'"
97     debug "RECEIVED: NETWORK_BROADCAST='${NETWORK_BROADCAST}'"
98     debug "RECEIVED: NETWORK_GATEWAY='${NETWORK_GATEWAY}'"
99     debug "RECEIVED: NETWORK_NAMESERVER='${NETWORK_NAMESERVER}'"
100 niro 719
101     main_diskpartition
102 niro 1015 debug "RECEIVED: PARTITION_DISK_SETUP='${PARTITION_DISK_SETUP}'"
103     debug "RECEIVED: PARTITION_DISK_ROOT='${PARTITION_DISK_ROOT}'"
104     debug "RECEIVED: PARTITION_FS_ROOT='${PARTITION_FS_ROOT}'"
105     debug "RECEIVED: PARTITION_DISK_BOOT='${PARTITION_DISK_BOOT}'"
106     debug "RECEIVED: PARTITION_FS_BOOT='${PARTITION_DISK_BOOT}'"
107     debug "RECEIVED: PARTITION_DISK_HOME='${PARTITION_DISK_HOME}'"
108     debug "RECEIVED: PARTITION_FS_HOME='${PARTITION_FS_HOME}'"
109     debug "RECEIVED: PARTITION_DISK_TMP='${PARTITION_DISK_TMP}'"
110     debug "RECEIVED: PARTITION_FS_TMP='${PARTITION_FS_TMP}'"
111     debug "RECEIVED: PARTITION_DISK_USER='${PARTITION_DISK_USER}'"
112     debug "RECEIVED: PARTITION_FS_USER='${PARTITION_FS_USER}'"
113     debug "RECEIVED: PARTITION_DISK_VAR='${PARTITION_DISK_VAR}'"
114     debug "RECEIVED: PARTITION_FS_VAR='${PARTITION_FS_VAR}'"
115     debug "RECEIVED: PARTITION_DISK_SVR='${PARTITION_DISK_SVR}'"
116     debug "RECEIVED: PARTITION_FS_SVR='${PARTITION_FS_SVR}'"
117     debug "RECEIVED: PARTITION_DISK_OPT='${PARTITION_DISK_OPT}'"
118     debug "RECEIVED: PARTITION_FS_OPT='${PARTITION_FS_OPT}'"
119     debug "RECEIVED: PARTITION_DISK_SWAP='${PARTITION_DISK_SWAP}'"
120     debug "RECEIVED: PARTITION_FS_SWAP='${PARTITION_DISK_SWAP}'"
121 niro 719
122     main_usermanagement
123 niro 1015 debug "RECEIVED: ROOT_PASSWORD='${ROOT_PASSWORD}'"
124     debug "RECEIVED: USER_NAME='${USER_NAME}'"
125     debug "RECEIVED: USER_PASSWORD='${USER_PASSWORD}'"
126 niro 719
127 niro 768 main_install
128    
129     # end of everything
130     rundialog FINISH
131    
132 niro 1034 # get back
133     popd
134    
135 niro 719 exit 0

Properties

Name Value
svn:executable *