Skip to content

Commit

Permalink
use posix sh compliant test
Browse files Browse the repository at this point in the history
  • Loading branch information
sechmann committed Oct 18, 2024
1 parent e171fcb commit e9fd19f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packaging/linux/postinstall
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@ ensure_line "nav/NAV_Sub_CA.crt" "/etc/ca-certificates.conf"

update-ca-certificates

systemd_version="$(systemctl --version | head -n 1 | grep -o '[0-9]+' | head -n 1)"
if [[ $systemd_version -gt 255 ]]; then
systemd_version="$(systemctl --version | head -n 1 | grep -oP '[0-9]+' | head -n 1)"
if [ "$((systemd_version))" -gt "255" ]; then
user_accounts=$(loginctl list-users -j | jq '[.[] | select(.uid >= 1000)]')
else
user_accounts=$(loginctl list-users --output json | jq '[.[] | select(.uid >= 1000)]')

0 comments on commit e9fd19f

Please sign in to comment.