aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fripost-partman-udeb/base.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fripost-partman-udeb/base.sh b/src/fripost-partman-udeb/base.sh
index 163134f..23fcdeb 100644
--- a/src/fripost-partman-udeb/base.sh
+++ b/src/fripost-partman-udeb/base.sh
@@ -602,6 +602,18 @@ getIPv4() {
##############################################################################
+# List all block devices that are not mounted on /cdrom
+#
+fripost_list_devices() {
+ local cdrom=$( sed -rn '\#^(\S+) /cdrom\s.*# {s//\1/p; q}' /proc/mounts )
+ [ "$cdrom" ] || fatal "Error: Is /cdrom a mountpoint?"
+
+ find /dev -type b | grep -v '[0-9]$' | grep -vFx "$cdrom"
+}
+
+
+
+##############################################################################
# Remove a partition from a device
#
# Usage: fripost_rmpart device partition