mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Changed ldd binary check from /bin/ls to /usr/bin/bash
Signed-off-by: spmfox <spmfox@foxwd.com>
This commit is contained in:
parent
9356d7bbb1
commit
2601162243
@ -2216,7 +2216,7 @@ get_binary_name() {
|
||||
local rev
|
||||
rev=$(uname -m | sed "s/[^0-9]//g;")
|
||||
local lib
|
||||
lib=$(ldd /bin/ls | grep -E '^\s*/lib' | awk '{ print $1 }')
|
||||
lib=$(ldd /bin/bash | grep -E '^\s*/lib' | awk '{ print $1 }')
|
||||
if [[ "${lib}" == "/lib/ld-linux-aarch64.so.1" ]]; then
|
||||
printf "%b %b Detected AArch64 (64 Bit ARM) processor\\n" "${OVER}" "${TICK}"
|
||||
# set the binary to be used
|
||||
|
@ -679,7 +679,7 @@ def test_FTL_detect_aarch64_no_errors(host):
|
||||
mock_command(
|
||||
'ldd',
|
||||
{
|
||||
'/bin/ls': (
|
||||
'/bin/bash': (
|
||||
'/lib/ld-linux-aarch64.so.1',
|
||||
'0'
|
||||
)
|
||||
@ -709,7 +709,7 @@ def test_FTL_detect_armv4t_no_errors(host):
|
||||
# mock uname to return armv4t platform
|
||||
mock_command('uname', {'-m': ('armv4t', '0')}, host)
|
||||
# mock ldd to respond with ld-linux shared library
|
||||
mock_command('ldd', {'/bin/ls': ('/lib/ld-linux.so.3', '0')}, host)
|
||||
mock_command('ldd', {'/bin/bash': ('/lib/ld-linux.so.3', '0')}, host)
|
||||
detectPlatform = host.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
@ -733,7 +733,7 @@ def test_FTL_detect_armv5te_no_errors(host):
|
||||
# mock uname to return armv5te platform
|
||||
mock_command('uname', {'-m': ('armv5te', '0')}, host)
|
||||
# mock ldd to respond with ld-linux shared library
|
||||
mock_command('ldd', {'/bin/ls': ('/lib/ld-linux.so.3', '0')}, host)
|
||||
mock_command('ldd', {'/bin/bash': ('/lib/ld-linux.so.3', '0')}, host)
|
||||
detectPlatform = host.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
@ -757,7 +757,7 @@ def test_FTL_detect_armv6l_no_errors(host):
|
||||
# mock uname to return armv6l platform
|
||||
mock_command('uname', {'-m': ('armv6l', '0')}, host)
|
||||
# mock ldd to respond with ld-linux-armhf shared library
|
||||
mock_command('ldd', {'/bin/ls': ('/lib/ld-linux-armhf.so.3', '0')}, host)
|
||||
mock_command('ldd', {'/bin/bash': ('/lib/ld-linux-armhf.so.3', '0')}, host)
|
||||
detectPlatform = host.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
@ -782,7 +782,7 @@ def test_FTL_detect_armv7l_no_errors(host):
|
||||
# mock uname to return armv7l platform
|
||||
mock_command('uname', {'-m': ('armv7l', '0')}, host)
|
||||
# mock ldd to respond with ld-linux-armhf shared library
|
||||
mock_command('ldd', {'/bin/ls': ('/lib/ld-linux-armhf.so.3', '0')}, host)
|
||||
mock_command('ldd', {'/bin/bash': ('/lib/ld-linux-armhf.so.3', '0')}, host)
|
||||
detectPlatform = host.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
@ -807,7 +807,7 @@ def test_FTL_detect_armv8a_no_errors(host):
|
||||
# mock uname to return armv8a platform
|
||||
mock_command('uname', {'-m': ('armv8a', '0')}, host)
|
||||
# mock ldd to respond with ld-linux-armhf shared library
|
||||
mock_command('ldd', {'/bin/ls': ('/lib/ld-linux-armhf.so.3', '0')}, host)
|
||||
mock_command('ldd', {'/bin/bash': ('/lib/ld-linux-armhf.so.3', '0')}, host)
|
||||
detectPlatform = host.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
|
Loading…
Reference in New Issue
Block a user