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-newfs.sh 232899 2012-03-12 21:32:43Z jpaetzel $
27
28# Functions related to disk operations using newfs
29
30
31# Function which performs the ZFS magic
32setup_zfs_filesystem()
33{
34 PART="$1"
--- 55 unchanged lines hidden (view full) ---
90 for PART in `ls ${PARTDIR}`
91 do
92 PARTDEV="`echo $PART | sed 's|-|/|g'`"
93 if [ ! -e "${PARTDEV}" ]
94 then
95 exit_err "ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel?"
96 fi
97
98 PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`"
99 PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`"
100 PARTENC="`cat ${PARTDIR}/${PART} | cut -d '#' -f 3`"
101 PARTLABEL="`cat ${PARTDIR}/${PART} | cut -d '#' -f 4`"
102 PARTGEOM="`cat ${PARTDIR}/${PART} | cut -d '#' -f 5`"
103 PARTXTRAOPTS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 6`"
104 PARTIMAGE="`cat ${PARTDIR}/${PART} | cut -d '#' -f 7`"
105
106 # Make sure journaling isn't enabled on this device
107 if [ -e "${PARTDEV}.journal" ]
108 then
109 rc_nohalt "gjournal stop -f ${PARTDEV}.journal"
110 rc_nohalt "gjournal clear ${PARTDEV}"
111 fi
112
--- 116 unchanged lines hidden ---
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-newfs.sh 232899 2012-03-12 21:32:43Z jpaetzel $
27
28# Functions related to disk operations using newfs
29
30
31# Function which performs the ZFS magic
32setup_zfs_filesystem()
33{
34 PART="$1"
--- 55 unchanged lines hidden (view full) ---
90 for PART in `ls ${PARTDIR}`
91 do
92 PARTDEV="`echo $PART | sed 's|-|/|g'`"
93 if [ ! -e "${PARTDEV}" ]
94 then
95 exit_err "ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel?"
96 fi
97
98 PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`"
99 PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`"
100 PARTENC="`cat ${PARTDIR}/${PART} | cut -d '#' -f 3`"
101 PARTLABEL="`cat ${PARTDIR}/${PART} | cut -d '#' -f 4`"
102 PARTGEOM="`cat ${PARTDIR}/${PART} | cut -d '#' -f 5`"
103 PARTXTRAOPTS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 6`"
104 PARTIMAGE="`cat ${PARTDIR}/${PART} | cut -d '#' -f 7`"
105
106 # Make sure journaling isn't enabled on this device
107 if [ -e "${PARTDEV}.journal" ]
108 then
109 rc_nohalt "gjournal stop -f ${PARTDEV}.journal"
110 rc_nohalt "gjournal clear ${PARTDEV}"
111 fi
112
--- 116 unchanged lines hidden ---