From ec45772a8454b8dcfafa55e2a445aeaa13afc510 Mon Sep 17 00:00:00 2001 From: Hubert Date: Fri, 15 Jan 2021 14:56:11 +0100 Subject: [PATCH] Add ability to specify supported option 'infinity' for LimitNPROC (#152) * Add ability to specify supported option 'infinity' for LimitNPROC From limits.conf(5) All items support the values -1, unlimited or infinity indicating no limit, except for priority and nice. * Extend validation to include improved regexp --- types/servicelimits.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/servicelimits.pp b/types/servicelimits.pp index 2be73b13..2c438db4 100644 --- a/types/servicelimits.pp +++ b/types/servicelimits.pp @@ -9,7 +9,7 @@ Optional['LimitRSS'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)(:\d+(K|M|G|T|P|E))?)))$'], Optional['LimitNOFILE'] => Variant[Integer[-1],Pattern['^(infinity|\d+(:(infinity|\d+))?)$']], Optional['LimitAS'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)(:\d+(K|M|G|T|P|E))?)))$'], - Optional['LimitNPROC'] => Integer[1], + Optional['LimitNPROC'] => Variant[Integer[-1],Pattern['^(infinity|\d+(:(infinity|\d+))?)$']], Optional['LimitMEMLOCK'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)(:\d+(K|M|G|T|P|E))?)))$'], Optional['LimitLOCKS'] => Integer[1], Optional['LimitSIGPENDING'] => Integer[1],