Skip to content

Commit 84d31bc

Browse files
committed
linux postinstall: replace no longer working --output param
1 parent 3baf220 commit 84d31bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packaging/linux/postinstall

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ ensure_line "nav/NAV_Sub_CA.crt" "/etc/ca-certificates.conf"
1919
update-ca-certificates
2020

2121
# Assert just _one_ logged-in user
22-
user_accounts=$(loginctl list-users --output json | jq '[.[] | select(.uid >= 1000)]')
23-
if echo "$user_accounts" | jq -e 'length != 1' > /dev/null; then
22+
user_accounts=$(loginctl list-users -j | jq '[.[] | select(.uid >= 1000)]')
23+
if echo "$user_accounts" | jq -e 'length != 1' >/dev/null; then
2424
printf "\nMore than 1 user account logged in! naisdevice only permits _one_ user account!\n"
2525
exit 1
2626
fi
2727

2828
# Assert only whitelisted service accounts "logged in" (if logged in at all)
29-
service_accounts=$(loginctl list-users --output json | jq -e '[.[] | select(.uid < 1000)]')
30-
if echo "$service_accounts" | jq -e 'length > 0' > /dev/null; then
29+
service_accounts=$(loginctl list-users -j | jq -e '[.[] | select(.uid < 1000)]')
30+
if echo "$service_accounts" | jq -e 'length > 0' >/dev/null; then
3131
is_not_whitelisted=0
3232

3333
whitelisted_service_accounts="gdm,"

0 commit comments

Comments
 (0)