summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-13 14:15:47 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-13 14:15:47 +0100
commite4c4661d3be2ca8776a9ed962e33fc5f87edcef0 (patch)
tree7e1c7b3ac15d6fd885aadf291f76dd930ef971ea /src
parent34d6fe7f18772f5465bbef9329ab1ae332bd01c4 (diff)
better debuglogging while creating partitions and shit
Diffstat (limited to 'src')
-rw-r--r--src/core/libs/lib-blockdevices-filesystems.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
index aa7dd6f..9e47c92 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -218,6 +218,7 @@ _mkfs() {
local _dest=$4
local _mountpoint=$5
+ debug "_mkfs: domk: $1, _device: $2, fstype: $3, dest: $4, mountpoint: $5"
# we have two main cases: "swap" and everything else.
if [ "${_fstype}" = "swap" ]; then
swapoff ${_device} >/dev/null 2>&1
@@ -345,6 +346,7 @@ partition ()
sfdisk_input=$(printf "$sfdisk_input")
# invoke sfdisk
+ debug "Partition calls: sfdisk $DEVICE -uM >$LOG 2>&1 <<< $sfdisk_input"
printk off
infofy "Partitioning $DEVICE"
sfdisk $DEVICE -uM >$LOG 2>&1 <<EOF
@@ -373,7 +375,7 @@ EOF
for fsspec in $STRING; do
mountpoint=$(echo $fsspec | tr -d ' ' | cut -f1 -d:)
fstype=$(echo $fsspec | tr -d ' ' | cut -f3 -d:)
- if [ $(echo $mountpoint | tr -d ' ' | grep '^/$' | wc -l) -eq 0 ]; then
+ if [ $(echo $mountpoint | tr -d ' ' | grep -c '^/$') -eq 0 ]; then
_mkfs yes ${DEVICE}${part} "$fstype" "$var_TARGET_DIR" "$mountpoint" || return 1
fi
part=$(($part + 1))