summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 10 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 05bbcc67d..96fb8b134 100644
--- a/meson.build
+++ b/meson.build
@@ -754,8 +754,11 @@ system_uid_max = get_option('system-uid-max')
if system_uid_max == ''
system_uid_max = run_command(
awk,
- 'BEGIN { uid=999 } /^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }',
- '/etc/login.defs').stdout()
+ '/^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }',
+ '/etc/login.defs').stdout().strip()
+ if system_uid_max == ''
+ system_uid_max = '999'
+ endif
endif
system_uid_max = system_uid_max.to_int()
conf.set('SYSTEM_UID_MAX', system_uid_max)
@@ -766,8 +769,11 @@ system_gid_max = get_option('system-gid-max')
if system_gid_max == ''
system_gid_max = run_command(
awk,
- 'BEGIN { gid=999 } /^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }',
- '/etc/login.defs').stdout()
+ '/^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }',
+ '/etc/login.defs').stdout().strip()
+ if system_gid_max == ''
+ system_gid_max = '999'
+ endif
endif
system_gid_max = system_gid_max.to_int()
conf.set('SYSTEM_GID_MAX', system_gid_max)