Deleted Added
full compact
26c26
< # $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh 209552 2010-06-27 16:46:11Z imp $
---
> # $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh 211730 2010-08-24 06:11:46Z imp $
55c55
< ZPOOLNAME=$(get_zpool_name "${PART}")
---
> ZPOOLNAME=$(get_zpool_name "${PART}")
57,63c57,63
< # Check if we have multiple zfs mounts specified
< for ZMNT in `echo ${MNTPOINT} | sed 's|,| |g'`
< do
< # First make sure we create the mount point
< if [ ! -d "${FSMNT}${ZMNT}" ] ; then
< mkdir -p ${FSMNT}${ZMNT} >>${LOGOUT} 2>>${LOGOUT}
< fi
---
> # Check if we have multiple zfs mounts specified
> for ZMNT in `echo ${MNTPOINT} | sed 's|,| |g'`
> do
> # First make sure we create the mount point
> if [ ! -d "${FSMNT}${ZMNT}" ] ; then
> mkdir -p ${FSMNT}${ZMNT} >>${LOGOUT} 2>>${LOGOUT}
> fi
65,73c65,73
< if [ "${ZMNT}" = "/" ] ; then
< ZNAME=""
< else
< ZNAME="${ZMNT}"
< echo_log "zfs create -p ${ZPOOLNAME}${ZNAME}"
< rc_halt "zfs create -p ${ZPOOLNAME}${ZNAME}"
< fi
< sleep 2
< rc_halt "zfs set mountpoint=${FSMNT}${ZNAME} ${ZPOOLNAME}${ZNAME}"
---
> if [ "${ZMNT}" = "/" ] ; then
> ZNAME=""
> else
> ZNAME="${ZMNT}"
> echo_log "zfs create -p ${ZPOOLNAME}${ZNAME}"
> rc_halt "zfs create -p ${ZPOOLNAME}${ZNAME}"
> fi
> sleep 2
> rc_halt "zfs set mountpoint=${FSMNT}${ZNAME} ${ZPOOLNAME}${ZNAME}"
75,77c75,77
< # Disable atime for this zfs partition, speed increase
< rc_nohalt "zfs set atime=off ${ZPOOLNAME}${ZNAME}"
< done
---
> # Disable atime for this zfs partition, speed increase
> rc_nohalt "zfs set atime=off ${ZPOOLNAME}${ZNAME}"
> done
80c80
< # If we are not on ZFS, lets do the mount now
---
> # If we are not on ZFS, lets do the mount now
97,98c97,98
< # Make sure our mount point exists
< mkdir -p ${FSMNT} >/dev/null 2>/dev/null
---
> # Make sure our mount point exists
> mkdir -p ${FSMNT} >/dev/null 2>/dev/null
100,107c100,107
< # First lets find and mount the / partition
< #########################################################
< for PART in `ls ${PARTDIR}`
< do
< if [ ! -e "/dev/${PART}" ]
< then
< exit_err "ERROR: The partition ${PART} does not exist. Failure in bsdlabel?"
< fi
---
> # First lets find and mount the / partition
> #########################################################
> for PART in `ls ${PARTDIR}`
> do
> if [ ! -e "/dev/${PART}" ]
> then
> exit_err "ERROR: The partition ${PART} does not exist. Failure in bsdlabel?"
> fi
125,133c125,129
< UFS) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime"
< ;;
< UFS+S) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime"
< ;;
< UFS+J) mount_partition ${PART}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime"
< ;;
< ZFS) mount_partition ${PART} ${PARTFS} ${PARTMNT}
< ;;
< *) exit_err "ERROR: Got unknown file-system type $PARTFS" ;;
---
> UFS) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;;
> UFS+S) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;;
> UFS+J) mount_partition ${PART}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime" ;;
> ZFS) mount_partition ${PART} ${PARTFS} ${PARTMNT} ;;
> *) exit_err "ERROR: Got unknown file-system type $PARTFS" ;;
135d130
<
137,138c132
<
< done
---
> done
140,147c134,141
< # Now that we've mounted "/" lets do any other remaining mount-points
< ##################################################################
< for PART in `ls ${PARTDIR}`
< do
< if [ ! -e "/dev/${PART}" ]
< then
< exit_err "ERROR: The partition ${PART} does not exist. Failure in bsdlabel?"
< fi
---
> # Now that we've mounted "/" lets do any other remaining mount-points
> ##################################################################
> for PART in `ls ${PARTDIR}`
> do
> if [ ! -e "/dev/${PART}" ]
> then
> exit_err "ERROR: The partition ${PART} does not exist. Failure in bsdlabel?"
> fi
149,151c143,145
< PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`"
< PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`"
< PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`"
---
> PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`"
> PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`"
> PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`"
153,158c147,152
< if [ "${PARTENC}" = "ON" ]
< then
< EXT=".eli"
< else
< EXT=""
< fi
---
> if [ "${PARTENC}" = "ON" ]
> then
> EXT=".eli"
> else
> EXT=""
> fi
160,163c154,157
< # Check if we've found "/" again, don't need to mount it twice
< echo "$PARTMNT" | grep "/," >/dev/null
< if [ "$?" != "0" -a "$PARTMNT" != "/" ]
< then
---
> # Check if we've found "/" again, don't need to mount it twice
> echo "$PARTMNT" | grep "/," >/dev/null
> if [ "$?" != "0" -a "$PARTMNT" != "/" ]
> then
165,185c159,176
< UFS) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime"
< ;;
< UFS+S) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime"
< ;;
< UFS+J) mount_partition ${PART}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime"
< ;;
< ZFS) mount_partition ${PART} ${PARTFS} ${PARTMNT}
< ;;
< SWAP) # Lets enable this swap now
< if [ "$PARTENC" = "ON" ]
< then
< echo_log "Enabling encrypted swap on /dev/${PART}"
< rc_halt "geli onetime -d -e 3des ${PART}"
< sleep 5
< rc_halt "swapon /dev/${PART}.eli"
< else
< echo_log "swapon ${PART}"
< sleep 5
< rc_halt "swapon /dev/${PART}"
< fi
< ;;
---
> UFS) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;;
> UFS+S) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;;
> UFS+J) mount_partition ${PART}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime" ;;
> ZFS) mount_partition ${PART} ${PARTFS} ${PARTMNT} ;;
> SWAP)
> # Lets enable this swap now
> if [ "$PARTENC" = "ON" ]
> then
> echo_log "Enabling encrypted swap on /dev/${PART}"
> rc_halt "geli onetime -d -e 3des ${PART}"
> sleep 5
> rc_halt "swapon /dev/${PART}.eli"
> else
> echo_log "swapon ${PART}"
> sleep 5
> rc_halt "swapon /dev/${PART}"
> fi
> ;;
187,189c178,180
< esac
< fi
< done
---
> esac
> fi
> done