SHARE
TWEET

Untitled

a guest Dec 8th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. ###########################################
  4. # Prerequisites
  5. ###########################################
  6. #install_packages='build-essential zlibc libglib2.0-dev python bison flex debhelper device-tree-compiler texinfo python acpica-tools libaio-dev libasound2-dev libattr1-dev libbluetooth-dev libbrlapi-dev libcap-dev libcap-ng-dev libcurl4-gnutls-dev libfdt-dev gnutls-dev libiscsi-dev libncurses5-dev libnuma-dev libpixman-1-dev libpulse-dev librados-dev librbd-dev libsasl2-dev libsdl1.2-dev libseccomp-dev libspice-server-dev libspice-protocol-dev libusb-1.0-0-dev libusbredirparser-dev libx11-dev libxen-dev linux-libc-dev uuid-dev xfslibs-dev zlib1g-dev libjpeg-dev libpng-dev libncursesw5-dev libepoxy-dev libgbm-dev libgtk-3-dev libvte-2.91-dev librdmacm-dev libibverbs-dev libibumad-dev'
  7.  
  8. ###########################################
  9. # Variables
  10. ###########################################
  11. username=pdclab
  12. primary=10.52.52.87
  13. backup=10.52.52.88
  14. source=./MFTVM-QEMU3/
  15. dst_dir=/home/pdclab/MFTVM-QEMU3/
  16. config_flags='--extra-cflags="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" --extra-ldflags="-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed" --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/qemu --firmwarepath=/usr/share/qemu:/usr/share/seabios:/usr/lib/ipxe/qemu --localstatedir=/var --disable-blobs --disable-strip --interp-prefix=/etc/qemu-binfmt/%M --localstatedir=/var  --disable-user --enable-system --enable-linux-user --enable-modules --enable-linux-aio --audio-drv-list=pa,alsa,oss --enable-attr --enable-bluez --enable-brlapi --enable-virtfs --enable-cap-ng --enable-curl --enable-fdt --enable-gnutls --enable-gtk --enable-vte --enable-libiscsi --enable-curses --enable-opengl --enable-rbd --enable-rdma --enable-vnc-sasl --disable-sdl --with-sdlabi=2.0 --enable-seccomp --enable-spice --enable-libusb --enable-usb-redir --enable-xen --enable-xfsctl --enable-vnc --enable-vnc-jpeg --enable-vnc-png --enable-kvm --enable-vhost-net'
  17.  
  18. ###########################################
  19. # Rsync source
  20. ###########################################
  21. tmux new-session -d bash
  22. tmux split-window -h bash
  23. tmux send -t 0:0.0 "rsync -avh --progress --delete $source $username@$primary:$dst_dir && exit" C-m
  24. tmux send -t 0:0.1 "rsync -avh --progress --delete $source $username@$backup:$dst_dir && exit" C-m
  25. tmux -2 attach-session -d
  26.  
  27. ###########################################
  28. # Configure, Make, Install
  29. ###########################################
  30. tmux new-session -d bash
  31. tmux split-window -h bash
  32. tmux send -t 0:0.0 "ssh $username@$primary 'cd $dst_dir && ./configure $config_flags && make -j8 && sudo make install' && sleep 5 && exit" C-m
  33. tmux send -t 0:0.1 "ssh $username@$backup 'cd $dst_dir && ./configure $config_flags && make -j8 && sudo make install' && sleep 5 && exit" C-m
  34. tmux -2 attach-session -d
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top