Show pagesourceOld revisionsBacklinksBack to top Share via Share via... Twitter LinkedIn Facebook Pinterest Telegram WhatsApp Yammer RedditRecent ChangesSend via e-MailPrintPermalink × NethServer::Validation Routines for handling system-wide validators Example use NethServer::Validation; my $exitcode = NethServer::Validation::validate($validator, @args); validate() Searches for all validator scripts inside the validator directory, '/etc/e-smith/validators' then executes them. A successful validation occurs when all scripts return 0 (success validation) or at least one script returns 2 (sufficient valid condition). Otherwise validation fails. Each script in the validator directory must return one of these exit values: 0: successful validation 1: validation failed (generic) 2: sufficient validation (successful) 3..255: failed with specific reason When a script returns 2 (sufficient validation) no further script will be processed and the validate() is successful. Scripts are not supposed to generate error messages under normal conditions, so we do not provide a mechanism for validator handlers to signal errors to the user. Errors can only be written to the log file. Return value The validate() function returns 0 on failure, 1 on success. The last documentation perldoc NethServer::Directory developer, esmith nethserver/validation.txt Last modified: 2016/11/30 16:21by Stephane de Labrusse