Changeset 85fcd57


Ignore:
Timestamp:
12/05/13 11:38:42 (13 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
a723389
Parents:
26e5e91 (diff), bac293d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/PCDM/src/loginWidget.cpp

    r72c9698 rbac293d  
    266266  if((text.length() != icon.length()) && (text.length() != info.length()) ){ qDebug() << "LoginWidget: Unequal text/icon desktop lists"; return; } 
    267267  listDE->clear(); 
     268  desktopIcons.clear(); desktopInfo.clear(); 
    268269  desktopIcons = icon; //save for later 
    269270  desktopInfo = info; //save for later 
  • src-qt4/PCDM/src/pcdm-gui.cpp

    r8877013 rbac293d  
    501501        if( deIcon.isEmpty() ){ deIcon = currentTheme->itemIcon("desktop"); } //set the default icon if none given 
    502502        if( !QFile::exists(deIcon) ){ deIcon = ":/images/desktop.png"; } 
    503       QString entry = deList[i] +";;;"+deIcon+";;;"+Backend::getDesktopComment(deList[i]); 
     503      QString entry = deList[i] +":::"+deIcon+":::"+Backend::getDesktopComment(deList[i]); 
    504504      DEL << entry; 
    505505      if(lastDE.isEmpty()){ lastDE = deList[i]; } //grab the highest-priority DE if empty 
     
    511511      for(int i=0; i<DEL.length(); i++){ 
    512512        //Now add the item 
    513         deSwitcher->addItem( DEL[i].section(";;;",0,0), DEL[i].section(";;;",1,1), DEL[i].section(";;;",2,2) ); 
     513        deSwitcher->addItem( DEL[i].section(":::",0,0), DEL[i].section(":::",1,1), DEL[i].section(":::",2,2) ); 
    514514      } 
    515515      //Set the switcher to the last used desktop environment 
     
    520520      QStringList deNames, deIcons, deInfo; 
    521521      for(int i=0; i<DEL.length(); i++){ 
    522         deNames << DEL[i].section(";;;",0,0); 
    523         deIcons << DEL[i].section(";;;",1,1); 
    524         deInfo << DEL[i].section(";;;",2,2); 
     522        deNames << DEL[i].section(":::",0,0); 
     523        deIcons << DEL[i].section(":::",1,1); 
     524        deInfo << DEL[i].section(":::",2,2); 
    525525      } 
    526       loginW->setDesktops(deList, deIcons, deInfo); 
     526      loginW->setDesktops(deNames, deIcons, deInfo); 
    527527      //Set the switcher to the last used desktop environment 
    528528      loginW->setCurrentDE(lastDE); 
  • src-sh/pc-installdialog/pc-installdialog.sh

    r549d441 r26e5e91  
    2222 
    2323PCSYS="/usr/local/sbin/pc-sysinstall" 
     24 
     25# The current ZPOOL type should default to single 
     26ZPOOL_TYPE="single" 
     27 
     28change_zpool() 
     29{ 
     30  get_zpool_menu 
     31  gen_pc-sysinstall_cfg 
     32} 
     33 
     34get_zpool_menu() 
     35{ 
     36  while : 
     37  do 
     38    dOpts="done \"Exit zpool menu\" single \"Convert to single-disk\"" 
     39 
     40    diskTot=`${PCSYS} disk-list | wc -l | awk '{print $1}'` 
     41    if [ $diskTot -gt 1 ] ; then 
     42      dOpts="$dOpts mirror \"Convert to mirror\" raidz1 \"Convert to raidz1\"" 
     43    fi 
     44    if [ $diskTot -gt 2 ] ; then 
     45      dOpts="$dOpts raidz2 \"Convert to raidz2\"" 
     46    fi 
     47    if [ $diskTot -gt 3 ] ; then 
     48      dOpts="$dOpts raidz3 \"Convert to raidz3\"" 
     49    fi 
     50 
     51    get_dlg_ans "--menu \"Current zpool: $ZPOOL_TYPE - $SYSDISK $ZPOOL_DISKS\" 20 50 10 ${dOpts}" 
     52    if [ -z "$ANS" ] ; then 
     53       exit_err "Invalid option selected!" 
     54    fi 
     55    case $ANS in 
     56       done) break ;; 
     57     single) ZPOOL_DISKS="" 
     58             ZPOOL_TYPE="single" 
     59             ;; 
     60     mirror) get_zpool_disks "mirror" "1" ;; 
     61     raidz1) get_zpool_disks "raidz1" "1" ;; 
     62     raidz2) get_zpool_disks "raidz2" "2" ;; 
     63     raidz3) get_zpool_disks "raidz3" "3" ;; 
     64          *) ;; 
     65    esac 
     66  done 
     67} 
     68 
     69get_zpool_disks() { 
     70  local type=$1 
     71  local min=$2 
     72 
     73  while : 
     74  do 
     75    dOpts="" 
     76 
     77    ${PCSYS} disk-list > /tmp/.dList.$$ 
     78    while read i 
     79    do 
     80      # Get the disk dev 
     81      d=`echo $i | cut -d ':' -f 1` 
     82 
     83      # Dont need to list the existing target disk 
     84      if [ "$SYSDISK" = "$d" ] ; then continue ; fi 
     85 
     86      # Get the disk description 
     87      desc=`echo $i | cut -d ':' -f 2` 
     88      size="`${PCSYS} disk-info $d | grep size | cut -d '=' -f 2`MB" 
     89      dOpts="$dOpts $d \"$desc ($size)\" off" 
     90    done < /tmp/.dList.$$ 
     91    rm /tmp/.dList.$$ 
     92 
     93 
     94    get_dlg_ans_no_exit "--single-quoted --checklist \"Select at least $min additional disk(s) for $type\" 22 45 15 ${dOpts}" 
     95    if [ $? -ne 0 ] ; then break; fi 
     96 
     97     ANS=`echo $ANS | sed "s|'||g"` 
     98 
     99     count=`echo $ANS | wc -w | awk '{print $1}'` 
     100     if [ $count -lt $min ] ; then 
     101        echo "Please select at least $min additional disks!" 
     102        rtn 
     103        continue 
     104     fi 
     105 
     106     ZPOOL_DISKS="$ANS" 
     107     ZPOOL_TYPE="$type" 
     108     break 
     109  done 
     110} 
    24111 
    25112change_zfs() 
     
    230317} 
    231318 
     319get_dlg_ans_no_exit() 
     320{ 
     321  TANS="/tmp/.pcinsdialog.$$" 
     322  if [ -e "$TANS" ] ; then rm ${TANS}; fi 
     323  if [ -e "$TANS.dlg" ] ; then rm ${TANS}.dlg; fi 
     324  while : 
     325  do 
     326    echo "dialog --title \"$TITLE\" ${@}" >${TANS}.dlg 
     327    sh ${TANS}.dlg 2>${TANS} 
     328    local err=$? 
     329 
     330    if [ ! -e "$TANS" ] ; then 
     331       ANS="" 
     332       return $err 
     333    fi 
     334    ANS=`cat ${TANS}` 
     335    return $err 
     336  done 
     337} 
     338 
    232339get_dlg_ans() 
    233340{ 
     
    527634   echo "# Avail FS Types, UFS, UFS+S, UFS+SUJ, UFS+J, ZFS, SWAP" >> ${CFGFILE} 
    528635   echo "# UFS.eli, UFS+S.eli, UFS+SUJ, UFS+J.eli, ZFS.eli, SWAP.eli" >> ${CFGFILE} 
    529    echo "disk0-part=ZFS 0 ${ZFSLAYOUT}" >> ${CFGFILE} 
     636 
     637   # Doing a single disk zpool, or a mirror/raidz[1-3]? 
     638   if [ "$ZPOOL_TYPE" = "single" ] ; then 
     639     echo "disk0-part=ZFS 0 ${ZFSLAYOUT}" >> ${CFGFILE} 
     640   else 
     641     echo "disk0-part=ZFS 0 ${ZFSLAYOUT} (${ZPOOL_TYPE}: `echo $ZPOOL_DISKS | sed 's| |,|g'`)" >> ${CFGFILE} 
     642   fi 
     643 
    530644   echo "disk0-part=SWAP 2000 none" >> ${CFGFILE} 
    531645   echo "commitDiskLabel" >> ${CFGFILE} 
     
    609723  while : 
    610724  do 
    611     dialog --title "PC-BSD Text Install - Edit Menu" --menu "Please select from the following options:" 18 40 10 disk "Change disk ($SYSDISK)" zfs "Change ZFS layout" network "Change networking" view "View install script" edit "Edit install script" back "Back to main menu" 2>/tmp/answer 
     725    dialog --title "PC-BSD Text Install - Edit Menu" --menu "Please select from the following options:" 18 40 10 disk "Change disk ($SYSDISK)" zpool "Change zpool settings" zfs "Change ZFS layout" network "Change networking" view "View install script" edit "Edit install script" back "Back to main menu" 2>/tmp/answer 
    612726    if [ $? -ne 0 ] ; then break ; fi 
    613727 
     
    621735             ;; 
    622736        zfs) change_zfs 
     737             ;; 
     738      zpool) change_zpool 
    623739             ;; 
    624740       view) more ${CFGFILE} 
     
    668784 
    669785 
    670 if [ ! -e "$CFGFILE" ] ; then 
     786if [ -e "$CFGFILE" ] ; then 
    671787   cp ${CFGFILE} ${CFGFILE}.bak 
    672788   rm ${CFGFILE} 
Note: See TracChangeset for help on using the changeset viewer.