Ignore:
Timestamp:
10/23/13 10:44:53 (10 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
ac9703b
Parents:
dfb8c89
Message:

Move ZFS layout to a variable in prep for a ZFS dataset editing dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-installdialog/pc-installdialog.sh

    r9855292 rd34bc77  
    99. /usr/local/share/pcbsd/scripts/functions.sh 
    1010 
     11# Dialog menu title 
    1112TITLE="PC-BSD Install Dialog" 
    1213 
    13 TANS="/tmp/.pcinsdialog.$$" 
    14  
     14# pc-sysinstall config file to write out to 
    1515CFGFILE="/tmp/sys-install.cfg" 
    1616 
     17# Default ZFS layout 
     18ZFSLAYOUT="/,/root,/tmp(compress=lz4),/usr(canmount=off),/usr/home,/usr/jails,/usr/obj(compress=lz4),/usr/pbi,/usr/ports(compress=lz4),/usr/ports/distfiles(compress=off),/usr/src(compress=lz4),/var(canmount=off),/var/audit(compress=lz4),/var/log(compress=lz4),/var/tmp(compress=lz4)" 
     19 
    1720get_dlg_ans() 
    1821{ 
    19     if [ -e "$TANS" ] ; then rm ${TANS}; fi 
    20     if [ -e "$TANS.dlg" ] ; then rm ${TANS}.dlg; fi 
    21     while : 
    22     do 
    23       echo "dialog --title \"$TITLE\" ${@}" >${TANS}.dlg 
    24       sh ${TANS}.dlg 2>${TANS} 
    25       if [ $? -ne 0 ] ; then 
    26         dialog --title "$TITLE" --yesno 'Exit the installer?' 8 30 
    27         if [ $? -eq 0 ] ; then exit_err "User canceled install" ; fi 
    28         continue 
    29       fi 
    30  
    31       if [ ! -e "$TANS" ] ; then 
    32          ANS="" 
    33          return 
    34       fi 
    35       ANS=`cat ${TANS}` 
    36       return 
    37     done 
     22  TANS="/tmp/.pcinsdialog.$$" 
     23  if [ -e "$TANS" ] ; then rm ${TANS}; fi 
     24  if [ -e "$TANS.dlg" ] ; then rm ${TANS}.dlg; fi 
     25  while : 
     26  do 
     27    echo "dialog --title \"$TITLE\" ${@}" >${TANS}.dlg 
     28    sh ${TANS}.dlg 2>${TANS} 
     29    if [ $? -ne 0 ] ; then 
     30      dialog --title "$TITLE" --yesno 'Exit the installer?' 8 30 
     31      if [ $? -eq 0 ] ; then exit_err "User canceled install" ; fi 
     32      continue 
     33    fi 
     34 
     35    if [ ! -e "$TANS" ] ; then 
     36       ANS="" 
     37       return 
     38    fi 
     39    ANS=`cat ${TANS}` 
     40    return 
     41  done 
    3842} 
    3943 
     
    310314   echo "# Avail FS Types, UFS, UFS+S, UFS+SUJ, UFS+J, ZFS, SWAP" >> ${CFGFILE} 
    311315   echo "# UFS.eli, UFS+S.eli, UFS+SUJ, UFS+J.eli, ZFS.eli, SWAP.eli" >> ${CFGFILE} 
    312    echo "disk0-part=ZFS 0 /,/root,/tmp(compress=lz4),/usr(canmount=off),/usr/home,/usr/jails,/usr/obj(compress=lz4),/usr/pbi,/usr/ports(compress=lz4),/usr/ports/distfiles(compress=off),/usr/src(compress=lz4),/var(canmount=off),/var/audit(compress=lz4),/var/log(compress=lz4),/var/tmp(compress=lz4)" >> ${CFGFILE} 
     316   echo "disk0-part=ZFS 0 ${ZFSLAYOUT}" >> ${CFGFILE} 
    313317   echo "disk0-part=SWAP 2000 none" >> ${CFGFILE} 
    314318   echo "commitDiskLabel" >> ${CFGFILE} 
Note: See TracChangeset for help on using the changeset viewer.