summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2011-03-25 04:19:48 +0100
committerAndreas Loibl <andreas@andreas-loibl.de>2011-03-25 04:19:48 +0100
commitf73535dba2c0ac1891da0ab81672d2a490d5d628 (patch)
tree76528bb30c59b7496520c6b94b34e8d9d8645bea /backend
parent9c63b98c194ed54e827e3380057219286963b58c (diff)
downloadacritoxinstaller-f73535dba2c0ac1891da0ab81672d2a490d5d628.zip
acritoxinstaller-f73535dba2c0ac1891da0ab81672d2a490d5d628.tar.gz
added hdmap- and (initial) devicemapper-support to frontend
Diffstat (limited to 'backend')
-rw-r--r--backend/modules/hdmap9
-rw-r--r--backend/modules/partitions11
2 files changed, 18 insertions, 2 deletions
diff --git a/backend/modules/hdmap b/backend/modules/hdmap
index 3056b93..ef669a3 100644
--- a/backend/modules/hdmap
+++ b/backend/modules/hdmap
@@ -339,8 +339,9 @@ function prepare_partitions_for_install()
done <<<"$cfg_hdmap"
}
-function get_full_hd_map()
+function fill_hdmap()
{
+ cfg_set hdmap "$(
(
echo "$cfg_hdmap"
root_disk="$(get_disk "$(hdmap_get device of mountpoint /)")"
@@ -360,6 +361,10 @@ function get_full_hd_map()
echo "$part:/media/$(basename "$part")::auto"
fi
done
- ) | sort -u -t: -k1,1
+ for part in $(list_dm_partitions)
+ do
+ echo "$part:::"
+ done
+ ) | sort -u -t: -k1,1)"
}
diff --git a/backend/modules/partitions b/backend/modules/partitions
index 0d59323..c869053 100644
--- a/backend/modules/partitions
+++ b/backend/modules/partitions
@@ -36,6 +36,17 @@ function list_all_partitions()
awk -vli="$(awk '{if($2=="sd") print $1;}' /proc/devices)" 'BEGIN{m=split(li,list," ")}{for(i=1;i<=m;i++) if($1==list[i]&&$2%16!=0) print "/dev/"$4;}' /proc/partitions
}
+# Synopsis: list_dm_partitions
+#
+# This function lists all device-mapper partitions
+# Output example:
+# /dev/mapper/volg-home
+# /dev/mapper/cryptoroot
+function list_dm_partitions()
+{
+ ls /dev/mapper/* 2>/dev/null | fmt -w1 | grep -v "/control$"
+}
+
# Synopsis: (e.g.) list_all_partitions | partitions_usage_details
#
# This function lists usage details for a list of partitions from STDIN