Skip to content

Commit 4563352

Browse files
authored
Fixes: Move SET_PASSWORD after package updates + ROS repository key (#135)
* Move SET_PASSWORD after package updates * Fix #136
1 parent 918604b commit 4563352

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

website/public/car_activation.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,22 @@ DR_CAR_UPDATE()
144144

145145
echo -e -n "\n- Updating DeepRacer car software...\n"
146146

147-
# Update ROS cert
148-
curl https://repo.ros2.org/repos.key | apt-key add -
147+
# Remove old ROS keys and config
148+
echo -e -n "\n- Remove old ROS keys and config"
149+
apt-key del "F42E D6FB AB17 C654"
150+
rm -f /usr/share/keyrings/ros-archive-keyring.gpg
151+
rm -f /etc/apt/sources.list.d/ros2-latest.list
152+
153+
# Add new ROS repository package
154+
echo -e -n "\n- Add new ROS repository package"
155+
export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')
156+
curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $UBUNTU_CODENAME)_all.deb"
157+
apt install /tmp/ros2-apt-source.deb
149158

150159
# Get latest key from OpenVINO
160+
echo -e -n "\n- Get latest OpenVINO GPG key"
151161
curl -o GPG-PUB-KEY-INTEL-SW-PRODUCTS https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
152-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS
162+
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS
153163

154164
# Update Ubuntu - removed for now as it takes so long from the standard 20.04 build
155165
# echo -e -n "\n- Updating Ubuntu packages"
@@ -435,7 +445,6 @@ elif [ $DISTRIB_RELEASE = "20.04" ] || [ $DISTRIB_RELEASE = "22.04" ]; then
435445
fi
436446

437447
# All cars
438-
SET_PASSWORD
439448
SSM_ACTIVATION
440449

441450
# AWS DeepRacer only
@@ -472,6 +481,9 @@ elif [ $DISTRIB_RELEASE = "20.04" ] || [ $DISTRIB_RELEASE = "22.04" ]; then
472481
# fi
473482

474483
# All cars
484+
if [ $varPass != NULL ]; then
485+
SET_PASSWORD
486+
fi
475487
if [ $varHost != NULL ]; then
476488
SET_HOSTNAME
477489
fi

0 commit comments

Comments
 (0)