Skip to content

Commit bc13877

Browse files
committed
ncp-dist-upgrade: Detect availability of bullseye-security package source more robustly
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
1 parent 9663ef7 commit bc13877

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

bin/ncp-dist-upgrade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ apt-get dist-upgrade -y
6969

7070
# install latest PHP version
7171
release_new=$(jq -r '.release' < "${new_cfg}")
72-
# the default repo in bullseye is bullseye-security - except for Raspbian
73-
[[ -f /usr/bin/raspi-config ]] || release_new="${release_new}-security"
72+
# the default repo in bullseye is bullseye-security - use bullseye if it is not available
73+
grep -v '#' /etc/apt/sources.list | grep 'bullseye-security' > /dev/null && release_new="${release_new}-security"
7474
php_ver_new=$(jq -r '.php_version' < "${new_cfg}")
7575

7676
$APTINSTALL -t ${release_new} php${php_ver_new} php${php_ver_new}-curl php${php_ver_new}-gd php${php_ver_new}-fpm php${php_ver_new}-cli php${php_ver_new}-opcache \

0 commit comments

Comments
 (0)