From ab9c1d3d968c80a15b1848edf4c8f11ba7afd683 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Sun, 2 Feb 2025 01:51:41 -0500 Subject: [PATCH] modules: cups: Fixup obvious missing bits I didn't merge these parts because I have some other WIP code I was working on. Might as well put this in now. --- modules/cups/main.mcl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/cups/main.mcl b/modules/cups/main.mcl index 8e44428c..d9daf87c 100644 --- a/modules/cups/main.mcl +++ b/modules/cups/main.mcl @@ -37,6 +37,12 @@ import "strings" class base() { $vardir = local.vardir("cups/") + pkg "cups" { + state => "installed", + + Before => File["/etc/cups/"], + } + file "/etc/cups/" { state => $const.res.file.state.exists, recurse => false, # not completely managed! @@ -64,12 +70,13 @@ class base() { cmd => "/usr/sbin/restorecon -rv /etc/cups/", # XXX: make some magic snippets which turn into ./mgmt snippet /etc/cups/ (for example) and get substituted in here! # XXX: or even better, instead of snippets which exec mgmt stuff, they turn into pure golang equivalents... - ifcmd => "mgmt:changed /etc/cups/", - watchcmd => "mgmt:dir /etc/cups/", + #ifcmd => "mgmt:changed /etc/cups/", # XXX: implement this + #watchcmd => "mgmt:dir /etc/cups/", # XXX: implement this } svc "cups" { - # TODO: manage this + state => "running", + startup => "enabled", } }