functions-disk.sh (213650) | functions-disk.sh (214143) |
---|---|
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-disk.sh 213650 2010-10-09 08:52:09Z imp $ | 26# $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh 214143 2010-10-21 17:29:18Z imp $ |
27 28# Functions related to disk operations using gpart 29 30# See if device is a full disk or partition/slice 31is_disk() 32{ 33 for _dsk in `sysctl -n kern.disks` 34 do --- 467 unchanged lines hidden (view full) --- 502 503 if [ -n "${tmpSLICE}" ] 504 then 505 DEST="${tmpSLICE}" 506 else 507 DEST="${DISK}" 508 fi 509 | 27 28# Functions related to disk operations using gpart 29 30# See if device is a full disk or partition/slice 31is_disk() 32{ 33 for _dsk in `sysctl -n kern.disks` 34 do --- 467 unchanged lines hidden (view full) --- 502 503 if [ -n "${tmpSLICE}" ] 504 then 505 DEST="${tmpSLICE}" 506 else 507 DEST="${DISK}" 508 fi 509 |
510 if iscompressed "${IMAGE}" 511 then 512 local COMPRESSION 513 514 get_compression_type "${IMAGE}" 515 COMPRESSION="${VAL}" 516 517 decompress_file "${IMAGE}" "${COMPRESSION}" 518 IMAGE="${VAL}" 519 fi 520 | |
521 write_image "${IMAGE}" "${DEST}" 522 check_disk_layout "${DEST}" 523 fi 524 525 # Now save which disk<num> this is, so we can parse it later during slice partition setup 526 if [ -z "${IMAGE}" ] 527 then 528 echo "disk${disknum}" >${SLICECFGDIR}/$tmpSLICE --- 307 unchanged lines hidden --- | 510 write_image "${IMAGE}" "${DEST}" 511 check_disk_layout "${DEST}" 512 fi 513 514 # Now save which disk<num> this is, so we can parse it later during slice partition setup 515 if [ -z "${IMAGE}" ] 516 then 517 echo "disk${disknum}" >${SLICECFGDIR}/$tmpSLICE --- 307 unchanged lines hidden --- |