-Greg
You might want to take a read of this page:
http://code.google.com/p/munki/wiki/BootstrappingWithMunki
It sounds like you make this file yourself...
For example like this:
touch /Users/Shared/.com.googlecode.munki.checkandinstallatstartup
>
>Thanks
Hope that helps,
Andrew
> Have I got things right then :-
>
> The script is called by a launchagent
> If munki finds it, it runs
??? The scrip runs /usr/local/munki/managedsoftwware directly.
> After running, and finding no more updates, it changes the
> modification date of the file
> It won't run again until the machine is re-started
> It won't do its random checks during the day
Yes, it will, unless you remove or modify /Library/LaunchDaemons/com.googlecode.munki.managedsoftwareupdate-check.plist
Make sure you think through all the implications here. If you are managing a bunch of lab machines that all turn on at 7 am each day, you might overload your munki web server if all your machines are trying to download a bunch of large update simultaneously.
Yes, if you modify com.googlecode.munki.managedsoftwareupdate-check.plist then you should re-create your preferred version every time after you install a new version of munkitools, unless you create separate pkginfos for each munki subpkgs and update only those which are changed with new munki version. With this method you may accidentally miss something important as there may be a completely new way how munki is launched with LaunchDaemons.
You can do your own LaunchDaemon-installer with a modified /LaunchDaemons/com.googlecode.munki.managedsoftwareupdate-check.plist.
Just use your own /Library/LaunchDaemons/com.googlecode.munki.managedsoftwareupdate-check.plist for installs-array with a checksum, this way munki knows that this has to be updated when needed.
And use a preflight script inside your pkg for unloading com.googlecode.munki.managedsoftwareupdate-check.plist (launchctl unload).
And for postflight (or munki postinstall) use a script which reloads your version using "launchctl load /LaunchDaemons/com.googlecode.munki.managedsoftwareupdate-check.plist".
The other possible way would be to use a munki preflight which compares current time to some list of allowed times for auto-runs.
And if current time is within the allowed time range then munki can run, otherwise autorun will be cancelled.
However, it may be much easier to modify just the LaunchDaemon itself.
And if I have understood launchd StartCalendarInterval correctly this could also be possible:
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Hour</key>
<integer>6</integer>
<key>Minute</key>
<integer>10</integer>
</dict>
<dict>
<key>Hour</key>
<integer>23</integer>
<key>Minute</key>
<integer>5</integer>
</dict>
</array>
This will run twice a day on the specified times (morning 06:10 and evening 23:05)
- MiqViq
The prefered way to "modify" a launch daemon for almost all software is
to disable the launch daemon you don't like & create your own with a new
name/identifier. This ensures your changes persist and you don't have a
file ownership collision between the main munki package and your
package. As munki won't touch your file, you can use the pre-packaged
munki installer in more cases.
(as root)
launchctl unload -w /Library/LaunchDaemons/com.googlecode.munki...plist
This disabling of a launch daemon persists across reinstalls of munki.
The disabled key is not stored in the plist, but in an override location
(somewhere in /var/db from memory).
Rob.
If your OS X version is 10.5 then launchctl unload -w writes unloaded status to the launchdaemon/agent file itself.
In 10.6 and later unloaded status is stored in database.
- MiqViq
> We also have several clusters of machines in the library which are
> open access. For these I am thinking of setting ManagedInstalls
> preference SuppressUserNotification to true. I understand with this
> setting, Munki will only install updates at the logon prompt.
Or when manually invoking Managed Software Update.
> May I
> ask however, what happens if Munki is installing an update and then
> someone logs on or is the logon box not available until the update is
> finished?
An install progress window hides the login window, so login is effectively prevented while Munki is installing items.
>
> I am trying to get Munki to start at a specific time but nothing
> happens. The machine's system log doesn't show any launchdaemon
> errors and the Munki logs don't show any activity for the time in
> question.
>
> Here is my modified com.googlecode.munki.managedsoftwareupdate-
> check.plist file. For testing, I set the random interval to 100 and
> the time to 16:30 and the machine was not sleeping at that time.
Did you restart after making this change or otherwise signal launchd to pay attention to your changed plist?
> If I
> get this working, will it make a difference if the machines are
> sleeping?
Yes, if the machine is sleeping, it won't run!
| It is working now. Don't know why now because earlier I made sure the machine has been re-started. Mac was set to do it at 10:45 but actually did at 10:47, must be due to the random time element. Lastly, using the plist with a specified calendar hour, the machines won't check during the day will they? I think this is the way I will roll munki out to our student machines. Thanks. ----------------------------------------------------------------------- “Weaseling out of things is important to learn. It’s what separates us from the animals.....except the weasel” ~ Homer Simpson --- On Thu, 17/11/11, Greg Neagle <gregn...@mac.com> wrote: |