Magellan Linux

Diff of /trunk/installer/ncurses-gui/usermanagement.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1032 by niro, Sun May 30 17:33:29 2010 UTC revision 1033 by niro, Sun May 30 18:27:24 2010 UTC
# Line 4  root_password_dialog() Line 4  root_password_dialog()
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" \
# Line 13  root_password_dialog() Line 13  root_password_dialog()
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()
# Line 28  add_user_dialog() Line 25  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" \
# Line 37  add_user_dialog() Line 34  add_user_dialog()
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()
# Line 83  rundialog_root_password_dialog() Line 77  rundialog_root_password_dialog()
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" ;;
# Line 146  rundialog_add_user_dialog() Line 141  rundialog_add_user_dialog()
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" ;;

Legend:
Removed from v.1032  
changed lines
  Added in v.1033