From 88e957f5e974d76d6a6c90085a54318432504e74 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 15 Aug 2009 21:59:25 +0200 Subject: [PATCH] Add virtio blockdevice to installer --- doc/packages-list.txt | 8 +++--- src/install+setup/install/mountdest.sh | 35 +++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/doc/packages-list.txt b/doc/packages-list.txt index 6ad47d062a..c974688454 100644 --- a/doc/packages-list.txt +++ b/doc/packages-list.txt @@ -100,7 +100,7 @@ * fbset-2.1 * fcron-3.0.4 * feedparser-4.1 -* fetchmail-6.3.10 +* fetchmail-6.3.11 * ffmpeg-export-2008-04-13 * file-4.17 * findutils-4.2.27 @@ -173,7 +173,7 @@ * libmad-0.15.1b * libnet-1.1.2.1 * libnl-1.1 -* libogg-1.1.3 +* libogg-1.1.4 * libpcap-1.0.0 * libpng-1.2.12 * libpri-1.4.1 @@ -184,7 +184,7 @@ * libtorrent-0.12.4 * libupnp-1.6.6 * libusb-0.1.12 -* libvorbis-1.2.0 +* libvorbis-1.2.3 * libwww-perl-5.803 * libxml2-2.6.26 * libxslt-1.1.17 @@ -279,7 +279,7 @@ * rssdler-0.4.0a * rsync-3.0.6 * rtorrent-0.8.4 -* samba-3.3.6 +* samba-3.3.7 * sane-1.0.19 * screen-4.0.3 * sdparm-1.01 diff --git a/src/install+setup/install/mountdest.sh b/src/install+setup/install/mountdest.sh index d1ce89b12e..11fd800562 100644 --- a/src/install+setup/install/mountdest.sh +++ b/src/install+setup/install/mountdest.sh @@ -33,7 +33,7 @@ for DEVICE in $(kudzu -qps -t 30 -c HD -b IDE | grep device: | cut -d ' ' -f 2 | umount /harddisk 2> /dev/null echo -n "$DEVICE" > /tmp/dest_device echo "${DEVICE} - yes, it is our destination" - exit 0 + exit 0 # IDE / use DEVICE for grub fi done @@ -56,7 +56,7 @@ for DEVICE in $(kudzu -qps -t 30 -c HD -b SCSI | grep device: | cut -d ' ' -f 2 umount /harddisk 2> /dev/null echo -n "$DEVICE" > /tmp/dest_device echo "${DEVICE} - yes, it is our destination" - exit 1 + exit 1 # SCSI/USB (always use /dev/sda as bootdevicename) fi fi done @@ -86,10 +86,39 @@ for DEVICE in $(kudzu -qps -t 30 -c HD -b RAID | grep device: | cut -d ' ' -f 2 else echo -n "$DEVICE" > /tmp/dest_device echo "${DEVICE} - yes, it is our destination" - exit 2 + exit 2 # Raid ( /dev/device/diskx ) fi fi fi done +# Virtio devices +echo "--> Virtio" +for DEVICE in vda vdb vdc vdd; do + if [ ! -e /dev/${DEVICE} ]; then + continue + else + mount /dev/${DEVICE} /harddisk 2> /dev/null + if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then + umount /harddisk 2> /dev/null + echo "${DEVICE} is source drive - SKIP" + continue + else + umount /harddisk 2> /dev/null + mount /dev/${DEVICE}1 /harddisk 2> /dev/null + if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then + umount /harddisk 2> /dev/null + echo "${DEVICE}1 is source drive - SKIP" + continue + else + umount /harddisk 2> /dev/null + echo -n "$DEVICE" > /tmp/dest_device + echo "${DEVICE} - yes, it is our destination" + exit 0 # like ide / use device for grub + fi + fi + fi +done + + exit 10 # Nothing found -- 2.39.5