Skip to content

Commit

Permalink
chore(install.sh): fix range compare
Browse files Browse the repository at this point in the history
Signed-off-by: Evgeniy Frolov <evgeniy.frolov@flant.com>
  • Loading branch information
Fral738 committed Dec 12, 2024
1 parent 3931ca0 commit efb8cc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ set_user_subuids_subgids() {
local free_range=$(get_free_range)

if grep -q "^$current_user:" /etc/subuid; then
local current_range=$(awk -F: -v user="$current_user" '$1 == user {print $2}' /etc/subuid)
local current_range=$(awk -F: -v user="$current_user" '$1 == user {print $3}' /etc/subuid)
if (( current_range < min_range_size )); then
abort "User $current_user has a subuid range smaller than $min_range_size. Please adjust it manually."
else
Expand All @@ -779,7 +779,7 @@ set_user_subuids_subgids() {
fi

if grep -q "^$current_user:" /etc/subgid; then
local current_range=$(awk -F: -v user="$current_user" '$1 == user {print $2}' /etc/subgid)
local current_range=$(awk -F: -v user="$current_user" '$1 == user {print $3}' /etc/subgid)
if (( current_range < min_range_size )); then
abort "User $current_user has a subgid range smaller than $min_range_size. Please adjust it manually."
else
Expand Down

0 comments on commit efb8cc7

Please sign in to comment.