start()
{
for unit in $cfg_storage; do
label="$(echo $unit | cut -f1 -d:)"
fstype="$(echo $unit | cut -f2 -d:)"
point="$(echo $unit | cut -f3 -d:)"
if ! [ -d "$point" ]; then
mkdir -p "$point"
fi
n=0; while [ $n -lt 120 ]; do
args=''
if [ $fstype = 'ext3' ]; then
args='-o noatime,data=ordered'
mount -t $fstype $args LABEL="$label" "$point"
if [ $? -eq 0 ]; then
break;
sleep 1
let n++
done
}
stop()
units=''
units="$unit $units"
for unit in $units; do
echo "* Unmounting $point..."
umount "$point"