From 8a613084bd466e1c8175fe8b0c22c64904dd7c3d Mon Sep 17 00:00:00 2001 From: Jake Keller Date: Mon, 28 Jun 2021 14:08:01 -0400 Subject: [PATCH 1/2] Fix ros version in ros-start (upgrade.sh) --- upgrade.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/upgrade.sh b/upgrade.sh index 0ea1791..879658c 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -218,6 +218,10 @@ then if [ -d usr/sbin ]; then echo "Restoring sbin" + if [ -f usr/sbin/ros-start ]; + then + changeRosDistroFile $OLD_ROSDISTRO $ROSDISTRO usr/sbin/ros-start + fi sudo cp -r usr/sbin/. /usr/sbin else echo "Skipping sbin; no backup" From 24edcb7911e9641cf687a7d36593af984f442b97 Mon Sep 17 00:00:00 2001 From: Jake Keller Date: Tue, 29 Jun 2021 15:22:57 -0400 Subject: [PATCH 2/2] Prevent upgrade.sh from overriting unit files Previous version would overwrite existing systemd unit files, creating various issues, e.g. with ssh.service. --- upgrade.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/upgrade.sh b/upgrade.sh index 879658c..dd889ff 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -237,8 +237,9 @@ then if [ -d system ]; then - echo "Restoring Systemd" - sudo cp -r system/. /etc/systemd/system + echo "Restoring ROS Systemd Unit File" + sudo cp -r system/multi-user.target.wants/ros.service /etc/systemd/system + sudo systemctl enable ros.service else echo "Skipping systemd; no backup" fi