contrib/nm-live-vm: share a directory with the live-vm

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-03-05 18:52:19 +01:00
parent fbc9c41e96
commit 78f94726a7
2 changed files with 9 additions and 1 deletions

View file

@ -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

View file

@ -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