Deleted Added
full compact
functions-cleanup.sh (232899) functions-cleanup.sh (240165)
1#!/bin/sh
2#-
3# Copyright (c) 2010 iXsystems, Inc. All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8# 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24# SUCH DAMAGE.
25#
1#!/bin/sh
2#-
3# Copyright (c) 2010 iXsystems, Inc. All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8# 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24# SUCH DAMAGE.
25#
26# $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh 232899 2012-03-12 21:32:43Z jpaetzel $
26# $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh 240165 2012-09-06 14:59:53Z jpaetzel $
27
28# Functions which perform the final cleanup after an install
29
30# Finishes up with ZFS setup before unmounting
31zfs_cleanup_unmount()
32{
33 # Loop through our FS and see if we have any ZFS partitions to cleanup
34 for PART in `ls ${PARTDIR}`

--- 9 unchanged lines hidden (view full) ---

44 for ZMNT in `echo ${PARTMNT} | sed 's|,| |g'`
45 do
46 if [ "${ZMNT}" = "/" ]
47 then
48 # Make sure we haven't already added the zfs boot line when
49 # Creating a dedicated "/boot" partition
50 cat ${FSMNT}/boot/loader.conf 2>/dev/null | grep -q "vfs.root.mountfrom=" 2>/dev/null
51 if [ $? -ne 0 ] ; then
27
28# Functions which perform the final cleanup after an install
29
30# Finishes up with ZFS setup before unmounting
31zfs_cleanup_unmount()
32{
33 # Loop through our FS and see if we have any ZFS partitions to cleanup
34 for PART in `ls ${PARTDIR}`

--- 9 unchanged lines hidden (view full) ---

44 for ZMNT in `echo ${PARTMNT} | sed 's|,| |g'`
45 do
46 if [ "${ZMNT}" = "/" ]
47 then
48 # Make sure we haven't already added the zfs boot line when
49 # Creating a dedicated "/boot" partition
50 cat ${FSMNT}/boot/loader.conf 2>/dev/null | grep -q "vfs.root.mountfrom=" 2>/dev/null
51 if [ $? -ne 0 ] ; then
52 echo "vfs.root.mountfrom=\"zfs:${ZPOOLNAME}\"" >> ${FSMNT}/boot/loader.conf
52 echo "vfs.root.mountfrom=\"zfs:${ZPOOLNAME}/ROOT/default\"" >> ${FSMNT}/boot/loader.conf
53 fi
54 export FOUNDZFSROOT="${ZPOOLNAME}"
55 fi
56 done
57 FOUNDZFS="1"
58 fi
59 done
60

--- 129 unchanged lines hidden (view full) ---

190 fi
191
192
193 # Set our ROOTFSTYPE for loader.conf if necessary
194 check_for_mount "${PARTMNT}" "/"
195 if [ $? -eq 0 ] ; then
196 if [ "${PARTFS}" = "ZFS" ] ; then
197 ROOTFSTYPE="zfs"
53 fi
54 export FOUNDZFSROOT="${ZPOOLNAME}"
55 fi
56 done
57 FOUNDZFS="1"
58 fi
59 done
60

--- 129 unchanged lines hidden (view full) ---

190 fi
191
192
193 # Set our ROOTFSTYPE for loader.conf if necessary
194 check_for_mount "${PARTMNT}" "/"
195 if [ $? -eq 0 ] ; then
196 if [ "${PARTFS}" = "ZFS" ] ; then
197 ROOTFSTYPE="zfs"
198 XPOOLNAME=$(get_zpool_name "${PARTDEV}")
199 ROOTFS="${ZPOOLNAME}"
198 ZPOOLNAME=$(get_zpool_name "${PARTDEV}")
199 ROOTFS="${ZPOOLNAME}/ROOT/default"
200 else
201 ROOTFS="${DEVICE}"
202 ROOTFSTYPE="ufs"
203 fi
204 fi
205
206 # Only create non-zfs partitions
207 if [ "${PARTFS}" != "ZFS" ]

--- 204 unchanged lines hidden ---
200 else
201 ROOTFS="${DEVICE}"
202 ROOTFSTYPE="ufs"
203 fi
204 fi
205
206 # Only create non-zfs partitions
207 if [ "${PARTFS}" != "ZFS" ]

--- 204 unchanged lines hidden ---