4 |
{ |
{ |
5 |
#ROOT_PASSWORD=$(passwordbox "root" "Enter a password for root:" 10 50) |
#ROOT_PASSWORD=$(passwordbox "root" "Enter a password for root:" 10 50) |
6 |
#ROOT_PASSWORD_RETYPE=$(passwordbox "root" "Re-enter the password:" 10 50) |
#ROOT_PASSWORD_RETYPE=$(passwordbox "root" "Re-enter the password:" 10 50) |
7 |
ROOT_USER_SETUP=($(dialog \ |
dialog \ |
8 |
--stdout \ |
--stdout \ |
9 |
--colors \ |
--colors \ |
10 |
--title "root" \ |
--title "root" \ |
13 |
--mixedform "Enter a password for root:" 10 60 0 \ |
--mixedform "Enter a password for root:" 10 60 0 \ |
14 |
" Username:" 1 1 "root" 1 18 36 0 2 \ |
" Username:" 1 1 "root" 1 18 36 0 2 \ |
15 |
" Password:" 2 1 "${ROOT_PASSWORD}" 2 18 36 0 1 \ |
" Password:" 2 1 "${ROOT_PASSWORD}" 2 18 36 0 1 \ |
16 |
"Retype Password:" 3 1 "${ROOT_PASSWORD_RETYPE}" 3 18 36 0 1)) |
"Retype Password:" 3 1 "${ROOT_PASSWORD_RETYPE}" 3 18 36 0 1 |
|
|
|
|
debug "ARRAY_LEN='${#ROOT_USER_SETUP[*]}'" |
|
|
debug "ROOT_USER_SETUP='${ROOT_USER_SETUP[*]}'" |
|
17 |
} |
} |
18 |
|
|
19 |
add_user_dialog() |
add_user_dialog() |
25 |
# USER_PASSWORD_RETYPE=$(passwordbox "${USER_NAME}" "Enter a password for '${USER_NAME}':" 10 50) |
# USER_PASSWORD_RETYPE=$(passwordbox "${USER_NAME}" "Enter a password for '${USER_NAME}':" 10 50) |
26 |
#fi |
#fi |
27 |
|
|
28 |
USER_SETUP=($(dialog \ |
dialog \ |
29 |
--stdout \ |
--stdout \ |
30 |
--colors \ |
--colors \ |
31 |
--title "User-Setup" \ |
--title "User-Setup" \ |
34 |
--mixedform "Please enter a username and password for daily use:" 10 60 0 \ |
--mixedform "Please enter a username and password for daily use:" 10 60 0 \ |
35 |
" Username:" 1 1 "${USER_NAME}" 1 18 36 0 0 \ |
" Username:" 1 1 "${USER_NAME}" 1 18 36 0 0 \ |
36 |
" Password:" 2 1 "${USER_PASSWORD}" 2 18 36 0 1 \ |
" Password:" 2 1 "${USER_PASSWORD}" 2 18 36 0 1 \ |
37 |
"Retype Password:" 3 1 "${USER_PASSWORD_RETYPE}" 3 18 36 0 1)) |
"Retype Password:" 3 1 "${USER_PASSWORD_RETYPE}" 3 18 36 0 1 |
|
|
|
|
debug "ARRAY_LEN='${#USER_SETUP[*]}'" |
|
|
debug "USER_SETUP='${USER_SETUP[*]}'" |
|
38 |
} |
} |
39 |
|
|
40 |
check_password() |
check_password() |
77 |
# ;; |
# ;; |
78 |
# esac |
# esac |
79 |
|
|
80 |
root_password_dialog |
local ROOT_USER_SETUP |
81 |
|
ROOT_USER_SETUP=($(root_password_dialog)) |
82 |
case $? in |
case $? in |
83 |
-1) die "Error!" ;; |
-1) die "Error!" ;; |
84 |
255) die "aborted by user" ;; |
255) die "aborted by user" ;; |
141 |
# ;; |
# ;; |
142 |
# esac |
# esac |
143 |
|
|
144 |
add_user_dialog |
local USER_SETUP |
145 |
|
USER_SETUP=($(add_user_dialog)) |
146 |
case $? in |
case $? in |
147 |
-1) die "Error!" ;; |
-1) die "Error!" ;; |
148 |
255) die "aborted by user" ;; |
255) die "aborted by user" ;; |