From 0572fc1647159ef0902fa3790bb89d0736666988 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Sat, 4 Jan 2020 15:22:34 +0100 Subject: [PATCH] Fixes a gen-config issue related to non-runnables. --- src/gen-config.cr | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gen-config.cr b/src/gen-config.cr index 260b8ce..7abf84e 100644 --- a/src/gen-config.cr +++ b/src/gen-config.cr @@ -20,12 +20,14 @@ class Service entry["domain"] = domain entry["ports"] = ports - user = Passwd.new("/etc/passwd", "/etc/group") - .try &.get_user(user_name).not_nil! + if !non_runnable + user = Passwd.new("/etc/passwd", "/etc/group") + .try &.get_user(user_name).not_nil! - entry["uid"] = user.uid - entry["gid"] = user.gid - entry["user"] = user.login + entry["uid"] = user.uid + entry["gid"] = user.gid + entry["user"] = user.login + end entry["consumers"] = Crinja.function do token = arguments.varargs[0].to_s