Skip to content

Commit e9fd19f

Browse files
committed
use posix sh compliant test
1 parent e171fcb commit e9fd19f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packaging/linux/postinstall

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ ensure_line "nav/NAV_Sub_CA.crt" "/etc/ca-certificates.conf"
1818

1919
update-ca-certificates
2020

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

0 commit comments

Comments
 (0)