From 710c21f2e9a4cfd8210d558dd34525fdaf7e501f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 24 Jul 2009 10:25:01 -0700 Subject: Use LOSETUP variable for all calls to /sbin/losetup --- scripts/zpool-config/lo-raid10.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/zpool-config/lo-raid10.sh') diff --git a/scripts/zpool-config/lo-raid10.sh b/scripts/zpool-config/lo-raid10.sh index 64602aec3..237666949 100644 --- a/scripts/zpool-config/lo-raid10.sh +++ b/scripts/zpool-config/lo-raid10.sh @@ -18,7 +18,7 @@ zpool_create() { rm -f ${FILE} || exit 1 dd if=/dev/zero of=${FILE} bs=1024k count=256 &>/dev/null || die "Error $? creating ${FILE}" - losetup ${DEVICE} ${FILE} || + ${LOSETUP} ${DEVICE} ${FILE} || die "Error $? creating ${FILE} -> ${DEVICE} loopback" DEVICES_M1="${DEVICES_M1} ${DEVICE}" done @@ -29,7 +29,7 @@ zpool_create() { rm -f ${FILE} || exit 1 dd if=/dev/zero of=${FILE} bs=1024k count=256 &>/dev/null || die "Error $? creating ${FILE}" - losetup ${DEVICE} ${FILE} || + ${LOSETUP} ${DEVICE} ${FILE} || die "Error $? creating ${FILE} -> ${DEVICE} loopback" DEVICES_M2="${DEVICES_M2} ${DEVICE}" done @@ -45,9 +45,9 @@ zpool_destroy() { ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME} for FILE in ${FILES}; do - DEVICE=`/sbin/losetup -a | grep ${FILE} | head -n1|cut -f1 -d:` + DEVICE=`${LOSETUP} -a | grep ${FILE} | head -n1|cut -f1 -d:` msg "Removing ${FILE} using loopback device ${DEVICE}" - losetup -d ${DEVICE} || + ${LOSETUP} -d ${DEVICE} || die "Error $? destroying ${FILE} -> ${DEVICE} loopback" rm -f ${FILE} || exit 1 done -- cgit v1.2.3