summaryrefslogtreecommitdiff
path: root/buildlive
diff options
context:
space:
mode:
Diffstat (limited to 'buildlive')
-rwxr-xr-xbuildlive18
1 files changed, 6 insertions, 12 deletions
diff --git a/buildlive b/buildlive
index 120c14d..bc2c12e 100755
--- a/buildlive
+++ b/buildlive
@@ -20,15 +20,6 @@ CLEAN_USB=0
. functions.sh
-msg() {
- echo -e "$1" >&2
-}
-
-fatalerror() {
- msg "\x1b[1;31m$1\x1b[0m"
- exit 1
-}
-
usage() {
>&2 cat << EOF
$0 [--root <path>] [options] [--distro=<metadist> <isofile>] [distro] ...
@@ -52,7 +43,7 @@ try_mount() {
then
if ! findmnt "$1" > /dev/null
then
- udevil mount "$1" > /dev/null
+ mount_block "$1" > /dev/null
mnt=$(findmnt -n -o TARGET "$1")
else
mnt=$(findmnt -n -o TARGET "$1")
@@ -63,6 +54,9 @@ try_mount() {
echo "$mnt"
}
+detect_block_mount_tool 2>/dev/null
+detect_iso_mount_tool 2>/dev/null
+
unset ISOPATH
CFGFILE="$HOME/.liveusb-builder"
test -f "$CFGFILE" && source "$CFGFILE" || true
@@ -263,9 +257,9 @@ fi
if [ "$UMOUNT_BOOT" == 1 ]; then
msg 'Trying to umount the boot mountpoint, you may need to wait for sync() to complete.'
- udevil umount "$BOOTPATH"
+ unmount_block "$BOOTPATH"
fi
if [ "$UMOUNT_ROOT" == 1 -a "$ROOTPATH" != "$BOOTPATH" ]; then
msg 'Trying to umount the root mountpoint, you may need to wait for sync() to complete.'
- udevil umount "$ROOTPATH"
+ unmount_block "$ROOTPATH"
fi