On 14 Mar 2015, at 10:56, Demiyo <er...@demiyo.de> wrote:
Is there a way, to run a script one time when i press "install". I write a self service script with some cleaning for the clients, make a pkg with "Payload-Free Package Creator" but munki run this "install" all the time because it think its not install.Greetings
--
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I took an initial stab at implementing this functionality; it's usually easier to discuss a concrete working example:This adds support for a new key in pkginfo items: "OnDemand" (I'm not married to this key name and may well change it in the future)If this key is present:1) The item is never considered installed. This means Munki will never think it needs to be removed, either (because it's not installed!)2) If you add such an item to a regular manifest:a) In managed_installs: you are likely to be sad, as Munki will try to install it over and over and over since it is never considered installed.b) In managed_updates: it will never be updated, since it is never considered installed.c) in managed_uninstalls: it will never be removed, since it is never considered installed.d) In optional_installs: congratulations, you made the only functional choice!
d) In optional_installs: congratulations, you made the only functional choice!Maybe have manifestutil detect the "OnDemand" key and present and error if it is any other choice besides optional install?
This would be sweet. Another thing might be a key that is like a delay key. You can only run this N number of times within N amount of time. Might be too much but would be a potential safeguard for excess amounts of tasks.
On Saturday, March 14, 2015 at 8:35:47 PM UTC-6, Erik wrote:This would be a great option. One immediate "tool" that comes to mind is repairing hard drive permissions.a) treat it similar to the icons - perhaps makecatalogs is ran and it automatically looks at a "selfservicescripts" folder and brings them into the catalogs. The name could be based on the name of the script. This would prevent an admin from adding it to any manifest.I see issues with this approach as well though (admins who use catalogs incorrectly or want want to test prior to production). Scripts inserted directly into catalogs will need to be validated for XML issues as well.B) I vote no.
--
I always like the sendmail-style "dont_blame_munki" :-)