Tools: initvagrant.sh: increase verbosity
- it needs to be run as root, but did not check. - increase the verbosity a bit as during 'vagrant up' as its often unclear which script is actually running.
This commit is contained in:
parent
f5b2d5ca66
commit
b3e8618f9d
@ -1,24 +1,36 @@
|
||||
#!/bin/bash
|
||||
echo "---------- $0 start ----------"
|
||||
|
||||
# this script is run by the root user in the virtual machine
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
who=$(whoami)
|
||||
echo "Initial setup of SITL-vagrant instance."
|
||||
if [ $who != 'root' ]; then
|
||||
echo "SORRY, MUST RUN THIS SCRIPT AS ROOT, GIVING UP"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VAGRANT_USER=ubuntu
|
||||
if [ -e /home/vagrant ]; then
|
||||
# prefer vagrant user
|
||||
VAGRANT_USER=vagrant
|
||||
fi
|
||||
echo USING VAGRANT_USER:$VAGRANT_USER
|
||||
|
||||
cd /home/$VAGRANT_USER
|
||||
|
||||
|
||||
# artful rootfs is 2GB without resize:
|
||||
sudo resize2fs /dev/sda1
|
||||
|
||||
usermod -a -G dialout $VAGRANT_USER
|
||||
|
||||
echo "calling pre-reqs script..."
|
||||
/vagrant/Tools/scripts/install-prereqs-ubuntu.sh -y
|
||||
echo "...pre-reqs script done... initvagrant.sh continues."
|
||||
|
||||
# run-in-terminal-window uses xterm:
|
||||
apt-get install -y xterm
|
||||
@ -35,6 +47,7 @@ apt-get install -y gcovr lcov
|
||||
# install pexpect for autotest.py
|
||||
pip install pexpect
|
||||
|
||||
|
||||
sudo -u $VAGRANT_USER ln -fs /vagrant/Tools/vagrant/screenrc /home/$VAGRANT_USER/.screenrc
|
||||
|
||||
# build JSB sim
|
||||
@ -55,3 +68,5 @@ touch /ardupilot.vagrant
|
||||
|
||||
# Now you can run
|
||||
# vagrant ssh -c "screen -d -R"
|
||||
echo "---------- $0 end ----------"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user