diff options
author | Thomas Haller <thaller@redhat.com> | 2014-03-05 18:52:19 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-06-30 17:42:09 +0200 |
commit | 78f94726a7e6063921cc05325519eb09c421c40b (patch) | |
tree | 29c1cbdc08c653abba2a92983acae9d8d7ba8054 | |
parent | fbc9c41e96b07798d08bba355dea8985d1b9c2f2 (diff) | |
download | NetworkManager-78f94726a7e6063921cc05325519eb09c421c40b.tar.gz |
contrib/nm-live-vm: share a directory with the live-vm
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rwxr-xr-x | contrib/fedora/nm-live-vm/nm-make-script.sh | 3 | ||||
-rwxr-xr-x | contrib/fedora/nm-live-vm/run.sh | 7 |
2 files changed, 9 insertions, 1 deletions
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 |