summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2011-03-18 22:45:58 +0100
committerAndreas Loibl <andreas@andreas-loibl.de>2011-03-18 22:45:58 +0100
commit7a9fe7af17c77db96ea51db95ee87a6b34fc330c (patch)
treec1d2d9d603329d06ffd216d0d3a8d5d0d89d804f /backend
parent6e1a57040af87449ae28469adcceead68f291d89 (diff)
downloadacritoxinstaller-7a9fe7af17c77db96ea51db95ee87a6b34fc330c.zip
acritoxinstaller-7a9fe7af17c77db96ea51db95ee87a6b34fc330c.tar.gz
loop-device and fstab fixes
Diffstat (limited to 'backend')
-rw-r--r--backend/modules/hdmap25
-rw-r--r--backend/modules/init5
-rw-r--r--backend/modules/install_main2
3 files changed, 31 insertions, 1 deletions
diff --git a/backend/modules/hdmap b/backend/modules/hdmap
index d57d105..3056b93 100644
--- a/backend/modules/hdmap
+++ b/backend/modules/hdmap
@@ -338,3 +338,28 @@ function prepare_partitions_for_install()
progress=$[progress+1]; emit_progress $[100*progress/progress_steps]
done <<<"$cfg_hdmap"
}
+
+function get_full_hd_map()
+{
+ (
+ echo "$cfg_hdmap"
+ root_disk="$(get_disk "$(hdmap_get device of mountpoint /)")"
+ for part in $(list_all_partitions)
+ do
+ if is_removeable "$part" && [ "$(get_disk "$part")" != "$root_disk" ]; then
+ echo "$part:::"
+ else
+ echo "$part:/media/$(basename "$part")::auto"
+ fi
+ done
+ for part in $(list_linux_partitions)
+ do
+ if is_removeable "$part" && [ "$(get_disk "$part")" != "$root_disk" ]; then
+ echo "$part:::"
+ else
+ echo "$part:/media/$(basename "$part")::auto"
+ fi
+ done
+ ) | sort -u -t: -k1,1
+}
+
diff --git a/backend/modules/init b/backend/modules/init
index f7a7628..cfe37e1 100644
--- a/backend/modules/init
+++ b/backend/modules/init
@@ -5,7 +5,10 @@ function init_installer()
[ -f /etc/default/distro ] && . /etc/default/distro
export FLL_DISTRO_MODE FLL_DISTRO_NAME FLL_LIVE_USER
mkdir -p /live/filesystem
- [ -d /live/filesystem/usr ] || mount -o ro /dev/loop0 /live/filesystem
+ if [ ! -d /live/filesystem/usr ]; then
+ LOOPDEV="$(losetup --all | awk -F: '/\/live\/image\/live/&&/filesystem/{print $1}')"
+ [ "$LOOPDEV" ] && mount -o ro "$LOOPDEV" /live/filesystem
+ fi
cfg_set hostname "${FLL_DISTRO_NAME}Box"
}
diff --git a/backend/modules/install_main b/backend/modules/install_main
index bee41af..efe775f 100644
--- a/backend/modules/install_main
+++ b/backend/modules/install_main
@@ -38,6 +38,8 @@ EOF
while IFS=: read device mountpoint filesystem automount
do
+ [ -z "$mountpoint" ] && continue
+
fstab_options=""; fstab_dump=0; fstab_pass=2; fstab_type=""
[ -z "$fstab_type" ] && fstab_type=$filesystem
[ -z "$fstab_type" ] && fstab_type=$(get_filesystem $device)