Commit 0a613f84 authored by Nikos Skalkotos's avatar Nikos Skalkotos

Merge branch 'hotfix-0.19.1'

parents 1da38b9d 11b510a6
2016-07-20, v0.19.1
* Add "auto" to the known Linux file systems
2016-01-28, v0.19
* Support Windows XP/2003 (windows-legacy OSFAMILY)
* Support 32-bit versions of Windows
......
__version__ = "0.19"
__version__ = "0.19.1"
......@@ -686,7 +686,7 @@ mount_all() {
case "$osfamily" in
linux)
fs="ext[234]|msdos|vfat|ntfs|btrfs|xfs"
fs="auto|ext[234]|msdos|vfat|ntfs|btrfs|xfs"
;;
freebsd)
fs="ufs|msdosfs|ntfs"
......@@ -702,10 +702,22 @@ mount_all() {
;;
esac
if [ ! -f "${target}/etc/fstab" ]; then
warn "No \`/etc/fstab' found under \`${target}'!"
return 0
fi
# Note: We swap the 2 first fstab entry fields to sort in accordance with mount points
fstab="$(grep -v ^\# "${target}/etc/fstab" \
| gawk "{ if (match(\$3, \"$fs\")) { print \$2,\$1,\$3 } }" \
| sort -bd)"
# <mpoint> <device> <fs>
if [ -z "$fstab" ]; then
warn "No useful entries where found in \`/etc/fstab'."
return 0
fi
# entry=(<mpoint> <device> <fs>)
while read -ra entry; do
# Skip root. It is already mounted
if [ "${entry[0]}" = "/" ]; then
......@@ -716,11 +728,33 @@ mount_all() {
types="auto"
if [ "$osfamily" = linux ]; then
# Linux persistent block device naming
# Not sure if this is needed when allowing auto fs but it doesn't harm
if [[ "${entry[1]}" =~ ^(none|proc|tmpfs)$ ]]; then
warn "Skipping fstab entry: \`${entry[1]} ${entry[0]} ${entry[2]}'"
continue
fi
# Skip floppies (the check is needed since we allow auto fs)
if [[ "${entry[1]}" =~ ^/dev/(fd[0-9]|floppy) || \
"${entry[0]}" =~ ^/(mnt|media)/floppy ]]; then
warn "Skipping fstab entry: \`${entry[1]} ${entry[0]} ${entry[2]}'"
continue
fi
# Skip cdroms (the check is needed since we allow auto fs)
if [[ "${entry[1]}" =~ ^/dev/cdrom || \
"${entry[0]}" =~ ^/(mnt|media)/cdrom ]]; then
warn "Skipping fstab entry: \`${entry[1]} ${entry[0]} ${entry[2]}'"
continue
fi
# Linux persistent block device naming
if [[ ${entry[1]} =~ ^(LABEL|UUID)= ]]; then
entry[1]=$(findfs "${entry[1]}")
else
log_error "fstab contains non-persistent block device names"
log_error "fstab contains non-persistent block device name: " \
"\`${entry[1]}' for mount point: \`${entry[0]}'"
fi
else
if [[ "$osfamily" =~ ^(open|net)bsd$ ]]; then
......
m4_define([devflow_version], [0.19])
m4_define([devflow_version], [0.19.1])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment