From 78f94726a7e6063921cc05325519eb09c421c40b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 5 Mar 2014 18:52:19 +0100 Subject: [PATCH] contrib/nm-live-vm: share a directory with the live-vm Signed-off-by: Thomas Haller --- contrib/fedora/nm-live-vm/nm-make-script.sh | 3 +++ contrib/fedora/nm-live-vm/run.sh | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/fedora/nm-live-vm/nm-make-script.sh b/contrib/fedora/nm-live-vm/nm-make-script.sh index 34ee49cd79..79e1dff869 100755 --- a/contrib/fedora/nm-live-vm/nm-make-script.sh +++ b/contrib/fedora/nm-live-vm/nm-make-script.sh @@ -50,4 +50,7 @@ domains=ALL EOF /bin/systemctl enable NetworkManager.service || exit 1 +mkdir /mnt/sda1 +echo "/dev/sda1 /mnt/sda1 vfat defaults 1 2" >> /etc/fstab + git gc diff --git a/contrib/fedora/nm-live-vm/run.sh b/contrib/fedora/nm-live-vm/run.sh index 7a5acbb7c1..cb8b6db7c4 100755 --- a/contrib/fedora/nm-live-vm/run.sh +++ b/contrib/fedora/nm-live-vm/run.sh @@ -8,6 +8,11 @@ if [ -f /etc/redhat-release ]; then OS=`cat /etc/redhat-release | cut -d" " -f1,2,3,4` fi +DIR="$(dirname "$(readlink -f "$0")")" +SDIR="$DIR/share" + +mkdir "$SDIR" + if [ "$OS" == "Red Hat Enterprise Linux" ]; then # qemu-kvm is installed in /usr/libexec on RHEL6 # and redirects its output to VNC server @@ -31,5 +36,5 @@ else QEMU="qemu-system-$ARCH -enable-kvm" } - $QEMU -m 2048 -net nic $NET_OPTIONS -kernel vmlinuz -append "video=1024x768 rootfstype=ramfs" -initrd initramfs.img + $QEMU -m 2048 -net nic $NET_OPTIONS -drive "file=fat:rw:$SDIR,cache=none" -kernel vmlinuz -append "video=1024x768 rootfstype=ramfs" -initrd initramfs.img fi