diff --git a/lgsm/data/almalinux-8.4.csv b/lgsm/data/almalinux-8.4.csv index 7103ad461..18cc51d75 100644 --- a/lgsm/data/almalinux-8.4.csv +++ b/lgsm/data/almalinux-8.4.csv @@ -1,4 +1,3 @@ -install,dnf install all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname ac ahl @@ -58,7 +57,7 @@ lo l4d l4d2 mc,java-11-openjdk -mcb +mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 7103ad461..18cc51d75 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -1,4 +1,3 @@ -install,dnf install all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname ac ahl @@ -58,7 +57,7 @@ lo l4d l4d2 mc,java-11-openjdk -mcb +mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 7103ad461..18cc51d75 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -1,4 +1,3 @@ -install,dnf install all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname ac ahl @@ -58,7 +57,7 @@ lo l4d l4d2 mc,java-11-openjdk -mcb +mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index a215112c1..15aa36465 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -1,4 +1,3 @@ -install,apt install all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname ac ahl diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 090894bdb..05249fcd8 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -1,4 +1,3 @@ -install,apt install all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc-s1,lib32stdc++6,hostname ac ahl diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 088082e4a..9e4a17137 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -1,4 +1,3 @@ -install,apt install all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname ac ahl diff --git a/lgsm/data/rocky-8.4.csv b/lgsm/data/rocky-8.4.csv index 7103ad461..18cc51d75 100644 --- a/lgsm/data/rocky-8.4.csv +++ b/lgsm/data/rocky-8.4.csv @@ -1,4 +1,3 @@ -install,dnf install all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname ac ahl @@ -58,7 +57,7 @@ lo l4d l4d2 mc,java-11-openjdk -mcb +mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 088082e4a..9e4a17137 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -1,4 +1,3 @@ -install,apt install all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname ac ahl diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index a215112c1..15aa36465 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -1,4 +1,3 @@ -install,apt install all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname ac ahl diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index b1831c2e6..2961dfd47 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -1,4 +1,3 @@ -install,apt install all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386 ac diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 090894bdb..05249fcd8 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -1,4 +1,3 @@ -install,apt install all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc-s1,lib32stdc++6,hostname ac ahl diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 5484c3407..9c9b3ffdc 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -144,6 +144,13 @@ fn_install_missing_deps(){ fi + # Add sudo dpkg --add-architecture i386 if using i386 packages. + if [ "$(command -v dpkg-query 2>/dev/null)" ]; then + if printf '%s\n' "${array_deps_required[@]}" | grep -q -P 'i386'; then + i386installcommand="sudo dpkg --add-architecture i386; " + fi + fi + # If automatic dependency install is available if [ "${autodepinstall}" == "0" ]; then fn_print_information_nl "Automatically installing missing dependencies." @@ -156,7 +163,7 @@ fn_install_missing_deps(){ sleep 1 echo -en " \r" if [ "$(command -v dpkg-query 2>/dev/null)" ]; then - cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; sudo dpkg --add-architecture i386; sudo apt-get update; sudo apt-get -y install ${array_deps_missing[*]}" + cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; ${i386installcommand}sudo apt-get update; sudo apt-get -y install ${array_deps_missing[*]}" eval "${cmd}" elif [ "$(command -v dnf 2>/dev/null)" ]; then cmd="sudo dnf -y install ${array_deps_missing[*]}" @@ -171,7 +178,7 @@ fn_install_missing_deps(){ # If automatic dependency install is unavailable. if [ "${autodepinstall}" != "0" ]; then if [ "$(command -v dpkg-query 2>/dev/null)" ]; then - echo -e "sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[*]}" + echo -e "${i386installcommand}sudo apt update; sudo apt install ${array_deps_missing[*]}" elif [ "$(command -v dnf 2>/dev/null)" ]; then echo -e "sudo dnf install ${array_deps_missing[*]}" elif [ "$(command -v yum 2>/dev/null)" ]; then @@ -301,7 +308,6 @@ fi # If the file successfully downloaded run the dependency check. if [ -f "${datadir}/${distroid}-${distroversion}.csv" ]; then - depinstall=$(awk -F, '$1=="install" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv")