Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch

This commit is contained in:
Brian Behlendorf 2010-07-28 16:41:32 -07:00
commit 1d6a7c84a8
5 changed files with 20 additions and 23 deletions

View File

@ -89,6 +89,7 @@ AC_CONFIG_FILES([
module/zfs/Makefile module/zfs/Makefile
module/zpios/Makefile module/zpios/Makefile
scripts/Makefile scripts/Makefile
scripts/common.sh
zfs.spec zfs.spec
zfs-modules.spec zfs-modules.spec
]) ])

36
scripts/common.sh → scripts/common.sh.in Executable file → Normal file
View File

@ -26,25 +26,27 @@ RAID10S=()
RAIDZS=() RAIDZS=()
RAIDZ2S=() RAIDZ2S=()
prefix=@prefix@
exec_prefix=@exec_prefix@
libexecdir=@libexecdir@
pkglibexecdir=${libexecdir}/@PACKAGE@
bindir=@bindir@
sbindir=@sbindir@
ETCDIR=${ETCDIR:-/etc} ETCDIR=${ETCDIR:-/etc}
DEVDIR=${DEVDIR:-/dev/disk/zpool} DEVDIR=${DEVDIR:-/dev/disk/zpool}
ZPOOLDIR=${ZPOOLDIR:-/usr/libexec/zfs/zpool-config} ZPOOLDIR=${ZPOOLDIR:-${pkglibexecdir}/zpool-config}
ZPIOSDIR=${ZPIOSDIR:-/usr/libexec/zfs/zpios-test}
ZPIOSPROFILEDIR=${ZPIOSPROFILEDIR:-/usr/libexec/zfs/zpios-profile}
ZDB=${ZDB:-/usr/sbin/zdb} ZDB=${ZDB:-${sbindir}/zdb}
ZFS=${ZFS:-/usr/sbin/zfs} ZFS=${ZFS:-${sbindir}/zfs}
ZINJECT=${ZINJECT:-/usr/sbin/zinject} ZINJECT=${ZINJECT:-${sbindir}/zinject}
ZPOOL=${ZPOOL:-/usr/sbin/zpool} ZPOOL=${ZPOOL:-${sbindir}/zpool}
ZPOOL_ID=${ZPOOL_ID:-/usr/bin/zpool_id} ZPOOL_ID=${ZPOOL_ID:-${bindir}/zpool_id}
ZTEST=${ZTEST:-/usr/sbin/ztest} ZTEST=${ZTEST:-${sbindir}/ztest}
ZPIOS=${ZPIOS:-/usr/sbin/zpios}
COMMON_SH=${COMMON_SH:-/usr/libexec/zfs/common.sh} COMMON_SH=${COMMON_SH:-${pkglibexecdir}/common.sh}
ZFS_SH=${ZFS_SH:-/usr/libexec/zfs/zfs.sh} ZFS_SH=${ZFS_SH:-${pkglibexecdir}/zfs.sh}
ZPOOL_CREATE_SH=${ZPOOL_CREATE_SH:-/usr/libexec/zfs/zpool-create.sh} ZPOOL_CREATE_SH=${ZPOOL_CREATE_SH:-${pkglibexecdir}/zpool-create.sh}
ZPIOS_SH=${ZPIOS_SH:-/usr/libexec/zfs/zpios.sh}
ZPIOS_SURVEY_SH=${ZPIOS_SURVEY_SH:-/usr/libexec/zfs/zpios-survey.sh}
LDMOD=${LDMOD:-/sbin/modprobe} LDMOD=${LDMOD:-/sbin/modprobe}
LSMOD=${LSMOD:-/sbin/lsmod} LSMOD=${LSMOD:-/sbin/lsmod}
@ -139,7 +141,7 @@ load_modules() {
for OPT in "$@"; do for OPT in "$@"; do
OPT_NAME=`echo ${OPT} | cut -f1 -d'='` OPT_NAME=`echo ${OPT} | cut -f1 -d'='`
if [ ${NAME} = "${OPT_NAME}" ]; then if [ ${NAME} = "${OPT_NAME}" ]; then
VALUE=`echo ${OPT} | cut -f2- -d'='` VALUE=`echo ${OPT} | cut -f2- -d'='`
fi fi
@ -316,7 +318,7 @@ udev_raid10_setup() {
udev_raidz_setup() { udev_raidz_setup() {
local RANKS=$1 local RANKS=$1
local CHANNELS=$2 local CHANNELS=$2
RAIDZS=() RAIDZS=()
for RANK in `seq 1 ${RANKS}`; do for RANK in `seq 1 ${RANKS}`; do
RAIDZ=("raidz") RAIDZ=("raidz")

View File

@ -7,8 +7,6 @@ basedir="$(dirname $0)"
SCRIPT_COMMON=common.sh SCRIPT_COMMON=common.sh
if [ -f "${basedir}/${SCRIPT_COMMON}" ]; then if [ -f "${basedir}/${SCRIPT_COMMON}" ]; then
. "${basedir}/${SCRIPT_COMMON}" . "${basedir}/${SCRIPT_COMMON}"
elif [ -f /usr/libexec/zfs/${SCRIPT_COMMON} ]; then
. /usr/libexec/zfs/${SCRIPT_COMMON}
else else
echo "Missing helper script ${SCRIPT_COMMON}" && exit 1 echo "Missing helper script ${SCRIPT_COMMON}" && exit 1
fi fi

View File

@ -7,8 +7,6 @@ basedir="$(dirname $0)"
SCRIPT_COMMON=common.sh SCRIPT_COMMON=common.sh
if [ -f "${basedir}/${SCRIPT_COMMON}" ]; then if [ -f "${basedir}/${SCRIPT_COMMON}" ]; then
. "${basedir}/${SCRIPT_COMMON}" . "${basedir}/${SCRIPT_COMMON}"
elif [ -f /usr/libexec/zfs/${SCRIPT_COMMON} ]; then
. /usr/libexec/zfs/${SCRIPT_COMMON}
else else
echo "Missing helper script ${SCRIPT_COMMON}" && exit 1 echo "Missing helper script ${SCRIPT_COMMON}" && exit 1
fi fi

View File

@ -5,8 +5,6 @@ basedir="$(dirname $0)"
SCRIPT_COMMON=common.sh SCRIPT_COMMON=common.sh
if [ -f "${basedir}/${SCRIPT_COMMON}" ]; then if [ -f "${basedir}/${SCRIPT_COMMON}" ]; then
. "${basedir}/${SCRIPT_COMMON}" . "${basedir}/${SCRIPT_COMMON}"
elif [ -f /usr/libexec/zfs/${SCRIPT_COMMON} ]; then
. /usr/libexec/zfs/${SCRIPT_COMMON}
else else
echo "Missing helper script ${SCRIPT_COMMON}" && exit 1 echo "Missing helper script ${SCRIPT_COMMON}" && exit 1
fi fi