Second attempt to make sure starter.sh has o+rx permissions
If starter.sh is missing o+rx on the roboRIO, the robot code will not
start. If o+rx permissions are missing, there are no error messages on
some driver stations which makes this hard to track down. Perhaps having
a umask of 0007 on my laptop has something to do with o+rx not being
set explicitly.
Updated starer.sh to properly copy the libstdc++.so.6.0.21 from
local copies of the repsitory not names 971-Robot-Code.h and
added link to the log files.
Tested under Debian stretch by successfully deploying to a newly
flashed roboRIO.
This change was merged into master in commit
ade7810852376a7f70d1c0e0e6f169b2ff4f8e0b on Sat Jan 20 13:56 2018.
It appears that it was removed from master in commit
cb091717cd465dfca867172266b68108c74b8251 by Austin on Wed Feb 21 20:01
2018. I suspect that this change was inadvertently removed since there
were no comments on why it was removed.
Change-Id: I0b578d2579f92fd62ebfae6feb98eecead3e5427
diff --git a/aos/config/setup_roborio.sh b/aos/config/setup_roborio.sh
index 8b8bae7..c0112f6 100755
--- a/aos/config/setup_roborio.sh
+++ b/aos/config/setup_roborio.sh
@@ -3,7 +3,13 @@
if [ $# != 1 ];
then
- echo "Usage: setup_robot.sh 971"
+ echo "# setup_robot.sh is used to configure a newly flashed roboRIO"
+ echo ""
+ echo "Usage: setup_roborio.sh 10.9.71.2"
+ echo ""
+ echo "# or if that does not work, try"
+ echo ""
+ echo "Usage: setup_roborio.sh roboRIO-971-frc.local"
exit 1
fi
@@ -21,11 +27,19 @@
else
echo "Adding l alias"
ssh "admin@${ROBOT_HOSTNAME}" 'echo "alias l=\"ls -la\"" >> /etc/profile'
+ echo "Adding symbolic link to loging directory"
+ ssh "admin@${ROBOT_HOSTNAME}" ln -s /media/sda1 logs
fi
+# Make sure starter.sh has the correct permissions to run the robot code.
+# If missing o+rx, the robot code will not start. No error messages on
+# some driver stations.
+ssh "admin@${ROBOT_HOSTNAME}" 'chmod go+rx robot_code/starter.sh'
+
ssh "admin@${ROBOT_HOSTNAME}" 'PATH="${PATH}":/usr/local/natinst/bin/ /usr/local/frc/bin/frcKillRobot.sh -r -t'
echo "Deploying robotCommand startup script"
scp aos/config/robotCommand "admin@${ROBOT_HOSTNAME}:/home/lvuser/"
+echo "Copying libstdc++.so.6.0.21 library to /usr/lib"
scp external/arm_frc_linux_gnueabi_repo/usr/arm-frc-linux-gnueabi/lib/libstdc++.so.6.0.21 "admin@${ROBOT_HOSTNAME}:/usr/lib/"