fix-keys added

This commit is contained in:
arcolinuxz 2023-03-12 11:27:01 +01:00
parent ab15eb33dd
commit ab9696dd15
5 changed files with 120 additions and 0 deletions

View file

@ -0,0 +1 @@
fix-keys

View file

@ -0,0 +1,116 @@
#!/bin/bash
#set -e
##################################################################################################################
# Author : Erik Dubois
# Website : https://www.erikdubois.be
# Website : https://www.alci.online
# Website : https://www.arcolinux.info
# Website : https://www.arcolinux.com
# Website : https://www.arcolinuxd.com
# Website : https://www.arcolinuxb.com
# Website : https://www.arcolinuxiso.com
# Website : https://www.arcolinuxforum.com
##################################################################################################################
#
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
#
##################################################################################################################
#tput setaf 0 = black
#tput setaf 1 = red
#tput setaf 2 = green
#tput setaf 3 = yellow
#tput setaf 4 = dark blue
#tput setaf 5 = purple
#tput setaf 6 = cyan
#tput setaf 7 = gray
#tput setaf 8 = light blue
##################################################################################################################
Online=0
function check_connectivity() {
local test_ip
local test_count
test_ip="8.8.8.8"
test_count=1
if ping -c ${test_count} ${test_ip} > /dev/null; then
tput setaf 2
echo
echo "You are online"
echo
tput sgr0
Online=1
else
tput setaf 1
echo
echo "You are not connected to the internet"
echo "We can not download the latest archlinux-keyring package"
echo
echo "Make sure you are online to retrieve packages"
echo
tput sgr0
Online=0
fi
}
check_connectivity
if [ $Online -eq 1 ] ; then
tput setaf 2
echo
echo "Installing the latest archlinux-keyring package from the internet"
echo
tput sgr0
sudo pacman -Sy archlinux-keyring --noconfirm
echo
fi
echo "###############################################################################"
echo "Removing the pacman databases at /var/lib/pacman/sync/*"
echo "###############################################################################"
echo
sudo rm /var/lib/pacman/sync/*
echo
echo "###############################################################################"
echo "Removing /etc/pacman.d/gnupg folder"
echo "###############################################################################"
echo
sudo rm -rf /etc/pacman.d/gnupg/*
echo
echo "###############################################################################"
echo "Initialize pacman keys with pacman-key --init"
echo "###############################################################################"
echo
sudo pacman-key --init
echo
echo "###############################################################################"
echo "Populating keyring with pacman-key --populate"
echo "###############################################################################"
echo
sudo pacman-key --populate
echo
echo "###############################################################################"
echo "Adding Ubuntu keyserver to /etc/pacman.d/gnupg/gpg.conf"
echo "###############################################################################"
echo
echo "
keyserver hkp://keyserver.ubuntu.com:80" | sudo tee --append /etc/pacman.d/gnupg/gpg.conf
echo
echo "###############################################################################"
echo "Getting new databases with pacman -Sy"
echo "###############################################################################"
echo
sudo pacman -Sy
echo
echo "###############################################################################"
echo "### DONE - YOU CAN CLOSE THIS WINDOW ####"
echo "###############################################################################"

View file

@ -0,0 +1 @@
fix-keys

View file

@ -0,0 +1 @@
fix-keys

View file

@ -27,4 +27,5 @@ file_permissions=(
["/usr/local/bin/alci-make-a-pure-arch"]="0:0:755"
["/usr/local/bin/alci-displaymanager-check"]="0:0:755"
["/usr/local/bin/get-nemesis-on-alci"]="0:0:755"
["/usr/local/bin/fix-keys"]="0:0:755"
)