B-AROL-O / ble-testsuite

Automated test suite for Bluetooth Low Energy devices
https://ble-testsuite.netlify.app
MIT License
1 stars 1 forks source link

[BUG]: install-freisa.sh fails if Docker is already installed #23

Closed gmacario closed 9 months ago

gmacario commented 9 months ago

Description of the bug

It looks like the install-freisa.sh script does not fail gracefully if Docker Engine was already installed.

Steps To Reproduce

  1. Launch install-freisa.sh
    curl -fsSL https://raw.githubusercontent.com/B-AROL-O/ble-testsuite/main/docs/install-freisa.sh | sh
  2. Launch install-freisa.sh a second time
    curl -fsSL https://raw.githubusercontent.com/B-AROL-O/ble-testsuite/main/docs/install-freisa.sh | sh
  3. Observe the messages on the console
ubuntu@rpird201b:~$ curl -fsSL https://raw.githubusercontent.com/B-AROL-O/ble-testsuite/main/docs/install-freisa.sh | sh
+ sudo apt-get update
Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease                                  
Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease                                
Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease                                 
Hit:5 https://download.docker.com/linux/ubuntu jammy InRelease                                      
Get:6 https://pkgs.tailscale.com/stable/ubuntu jammy InRelease             
Fetched 6557 B in 3s (2340 B/s)                      
Reading package lists... Done
...
+ curl -fsSL https://get.docker.com -o get-docker.sh
+ sudo sh ./get-docker.sh --dry-run
# Executing docker install script, commit: e5543d473431b782227f8908005543bb4389b8de
Warning: the "docker" command appears to already exist on this system.

If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.

If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.

You may press Ctrl+C now to abort this script.
+ sleep 20
apt-get update -qq >/dev/null
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
install -m 0755 -d /etc/apt/keyrings
curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list
apt-get update -qq >/dev/null
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null
+ sudo sh ./get-docker.sh
# Executing docker install script, commit: e5543d473431b782227f8908005543bb4389b8de
Warning: the "docker" command appears to already exist on this system.

If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.

If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.

You may press Ctrl+C now to abort this script.
+ sleep 20
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 22366 (apt-get)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
ubuntu@rpird201b:~$

Additional Information

No response