Project

General

Profile

« Previous | Next » 

Revision d440bb6a

Added by Jim Pingle about 4 years ago

Update config recovery to use new zpool name. Issue #12005

View differences:

tools/installer/recover_configxml.sh
84 84
		if [ "${fs_type}" == "zfs" ]; then
85 85
			# Load KLD for ZFS support
86 86
			/sbin/kldload zfs
87
			# Import pool (name=zroot) with alternate mount
87
			# Import pool with alternate mount. Try zoot first, then pfSense
88 88
			/sbin/zpool import -R ${recovery_mount} -f zroot
89
			# Mount the default root directory of the previous install
90
			/sbin/mount -t zfs zroot/ROOT/default ${recovery_mount}
89
			zpool_import=$?
90
			if [ ${zpool_import} -eq 0 ]; then
91
				# Mount the default root directory of the previous install
92
				/sbin/mount -t zfs zroot/ROOT/default ${recovery_mount}
93
			else
94
				# If the pool name is pfSense, it's the new style layout
95
				/sbin/zpool import -R ${recovery_mount} -f pfSense
96
				# New layout has /cf/conf as its own dataset and doesn't need
97
				# its root mounted manually to reach it.
98
			fi
91 99
		fi
92 100
	fi
93 101

  
......
105 113

  
106 114
	# ZFS cleanup, export the pool and then unload ZFS KLD.
107 115
	if [ "${fs_type}" == "zfs" ]; then
108
		/sbin/zpool export -f zroot
116
		/sbin/zpool export -f zroot pfSense
109 117
		/sbin/kldunload zfs
110 118
	fi
111 119
fi

Also available in: Unified diff