- todev=$(cat /proc/mounts | grep -s " $(base_path ${todir}) " | awk '{print $1}' )
- freespace=$(df -k | grep -s ${todev} | awk '{print $4}')
+ todev=$(awk -v pat="$(base_path ${todir})" '$2 == pat { print $1 }' /proc/mounts)
+ freespace=$(df -k | awk '/'${todev}'/{print $4}')
# strange things happens, user confused?
snaploop=$( losetup ${dev} | awk '{print $3}' | tr -d '()' )
snapfile=$(basename ${snaploop})
# strange things happens, user confused?
snaploop=$( losetup ${dev} | awk '{print $3}' | tr -d '()' )
snapfile=$(basename ${snaploop})
# snapshots to be sure to really store some e.g key config files,
# but not on the same media
blacklistdev="${cowprobe}"
# snapshots to be sure to really store some e.g key config files,
# but not on the same media
blacklistdev="${cowprobe}"
fi
# homecow just mount something on /home, this should be generalized some way
homecow=$(find_cow_device "${home_persistence}" "${blacklistdev}")
fi
# homecow just mount something on /home, this should be generalized some way
homecow=$(find_cow_device "${home_persistence}" "${blacklistdev}")
root_snapdata=$(find_snap "${root_snapshot_label}" "${blacklistdev}")
# This second type should be removed when snapshot will get smarter,
# hence when "/etc/live-snapshot*list" will be supported also by
root_snapdata=$(find_snap "${root_snapshot_label}" "${blacklistdev}")
# This second type should be removed when snapshot will get smarter,
# hence when "/etc/live-snapshot*list" will be supported also by