Restart Action

218 views
Skip to first unread message

Gary Bernstein

unread,
Aug 4, 2010, 1:00:28 PM8/4/10
to munk...@googlegroups.com
I’m getting back to this project now and I noticed that I created a few installers that I believe are set within the installer to require a restart (and running them outside of munki does confirm this information).

I noticed that pkginfo is not listing this info. Where does that information get read from?

I see from the Adobe and iLife examples that there is a key (RestartAction) and strings of RequireRestart and RequireLogout.

Do I need to add these manually (which is fine)? If so, what are the other valid strings. If not, what should be picking up this info. and from where?

Thanks
-Gary

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -- "The reward for work well done is the opportunity to do more."

 -- "I tried, but it didn't work" is a lot better than "I wish I'd tried."

        Gary R. Bernstein        Director of Computer Information & Access
        bern...@illinois.edu      Krannert Center for the Performing Arts
        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Greg Neagle

unread,
Aug 4, 2010, 1:06:19 PM8/4/10
to munk...@googlegroups.com
makepkginfo should get this from the package.

On the packages you think should have the restart flag set, what does this command output?

installer -query RestartAction -pkg <path_to_a_pkg>

-Greg

--
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To post to this group, send email to munk...@googlegroups.com.
To unsubscribe from this group, send email to munki-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/munki-dev?hl=en.

Gary Bernstein

unread,
Aug 4, 2010, 1:33:22 PM8/4/10
to munk...@googlegroups.com
It says None. Hmmm.

To save some time, I am including my Info.plist.

Thanks
-Gary



On 8/4/10 12:06 PM, "Greg Neagle" <gregn...@mac.com> wrote:

makepkginfo should get this from the package.

On the packages you think should have the restart flag set, what does this command output?

installer -query RestartAction -pkg <path_to_a_pkg>

-Greg

On Aug 4, 2010, at 10:00 AM, Gary Bernstein wrote:

I’m getting back to this project now and I noticed that I created a few installers that I believe are set within the installer to require a restart (and running them outside of munki does confirm this information).

I noticed that pkginfo is not listing this info. Where does that information get read from?

I see from the Adobe and iLife examples that there is a key (RestartAction) and strings of RequireRestart and RequireLogout.

Do I need to add these manually (which is fine)? If so, what are the other valid strings. If not, what should be picking up this info. and from where?

Thanks
-Gary

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -- "The reward for work well done is the opportunity to do more."

 -- "I tried, but it didn't work" is a lot better than "I wish I'd tried."

        Gary R. Bernstein        Director of Computer Information & Access
        bern...@illinois.edu <x-msg://108/bern...@illinois.edu>       Krannert Center for the Performing Arts

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Info.plist

Greg Neagle

unread,
Aug 4, 2010, 1:57:47 PM8/4/10
to munk...@googlegroups.com
Legal values for IFPkgFlagRestartAction are:

None
RequireRestart
RecommendRestart
RequireLogout
RecommendLogout
RequireShutdown

Your Info.plist has simply "Required".

-Greg

--
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To post to this group, send email to munk...@googlegroups.com.
To unsubscribe from this group, send email to munki-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/munki-dev?hl=en.
<Info.plist>

Gary Bernstein

unread,
Aug 4, 2010, 6:00:40 PM8/4/10
to munk...@googlegroups.com
Interesting... I’ll give that a try tomorrow.

Thanks
-Gary
        bern...@illinois.edu <x-msg://139/bern...@illinois.edu>  <x-msg://108/bern...@illinois.edu <x-msg://108/bern...@illinois.edu> >       Krannert Center for the Performing Arts

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -- "The reward for work well done is the opportunity to do more."

 -- "I tried, but it didn't work" is a lot better than "I wish I'd tried."

        Gary R. Bernstein        Director of Computer Information & Access
        bern...@illinois.edu <x-msg://139/bern...@illinois.edu>       Krannert Center for the Performing Arts

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Gary Bernstein

unread,
Aug 5, 2010, 10:56:07 AM8/5/10
to munk...@googlegroups.com
Are the 3 Require.... keys actually Required...?

I am seeing RequiredRestart in some places.

Thanks
-Gary
        bern...@illinois.edu <x-msg://139/bern...@illinois.edu>  <x-msg://108/bern...@illinois.edu <x-msg://108/bern...@illinois.edu> >       Krannert Center for the Performing Arts

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -- "The reward for work well done is the opportunity to do more."

 -- "I tried, but it didn't work" is a lot better than "I wish I'd tried."

        Gary R. Bernstein        Director of Computer Information & Access
        bern...@illinois.edu <x-msg://139/bern...@illinois.edu>       Krannert Center for the Performing Arts

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Greg Neagle

unread,
Aug 5, 2010, 11:40:12 AM8/5/10
to munk...@googlegroups.com
Nope. 

Sent from my iPhone

Gary Bernstein

unread,
Sep 14, 2010, 11:04:33 AM9/14/10
to munk...@googlegroups.com
Just an FYI: I just created a Composer package and set the drop down menu for Restart Action to Required and, after making the package, in the Info.plist the IFPkgFlagRestartAction is set to Required.

-Gary

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -- "The reward for work well done is the opportunity to do more."

 -- "I tried, but it didn't work" is a lot better than "I wish I'd tried."

        Gary R. Bernstein        Director of Computer Information & Access
        bern...@illinois.edu <mailto:bern...@illinois.edu>  <x-msg://139/bern...@illinois.edu <mailto://139/bern...@illinois.edu> >       Krannert Center for the Performing Arts

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -- "The reward for work well done is the opportunity to do more."

 -- "I tried, but it didn't work" is a lot better than "I wish I'd tried."

        Gary R. Bernstein        Director of Computer Information & Access
        bern...@illinois.edu <mailto:bern...@illinois.edu>       Krannert Center for the Performing Arts

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Greg Neagle

unread,
Sep 14, 2010, 11:27:03 AM9/14/10
to munk...@googlegroups.com
Composer has historically authored packages that do not match those generated by Apple's PackageMaker; I've had to put special-case code in munki to deal with Composer's oddities. When you try to install the package you just created, does Installer.app actually recognize that the package requires a restart?

Sent from my iPad

Greg Neagle

unread,
Sep 14, 2010, 11:36:13 AM9/14/10
to munk...@googlegroups.com
Alternately, what does the installer command line have to say about these Composer-generated packages?

installer -query RestartAction -pkg <path_to_a_pkg>

Sent from my iPad

Jason Hueske

unread,
Sep 14, 2010, 1:12:44 PM9/14/10
to munk...@googlegroups.com
I can confirm that it sets the key to "Required" in Composer 7.3.

When I run installer -query it returns "None," even if I change the IFPkgFlagRestartAction to one of the legal values listed below.

Off topic: Because of these kinds of bugs I long ago abandoned Composer for package building for all sources other than my repackaged Office 2008, which seems to break because of symlinks in the installation. If anyone has any tips for that I'd appreciate it, but understand that this is not the venue. :)

- Jason

Greg Neagle

unread,
Sep 14, 2010, 1:53:56 PM9/14/10
to munk...@googlegroups.com
How about the GUI Installer?  Does it act as if the package needs a restart?

The legal values for the key:

None
RequiredRestart
RecommendedRestart
RequiredLogout
RequiredShutdown

which are not the ones I posted earlier. The confusion comes from the output of installer -query RestartAction -pkg <path-to-pkg>, which for each of the keys above, outputs:

None
RequireRestart
RecommendRestart
RequireLogout
RequireShutdown

Further testing shows that "RequiredShutdown" does not work; I wonder if it is something that was supported in the past, but has been dropped?

Not much point in adding special-case code to munki to handle Composer oddities if Installer.app and /usr/sbin/installer don't recognize the oddities, either.

-Greg

Jason Hueske

unread,
Sep 14, 2010, 2:52:22 PM9/14/10
to munk...@googlegroups.com
Composer 7.3 builds with the following:

GUI option -> IFPkgFlagRestartAction key:
No Restart -> NoRestart
Recommended -> Recommended
Required -> Required

In 10.6 at least the GUI installer results in a simple "Close" every time, no restart recommended or required. JAMF has fixed stuff like this before when they were alerted to it. I'll go ahead and let them know. I would however strongly recommend building the packages with /usr/bin/packagemaker, even if you use Composer to help assemble some of the sources for it. Other than the one exception of the Office 2008 symlink issue I've had much better results maintaining 100 or so packages this way.

- Jason

Gary Bernstein

unread,
Sep 14, 2010, 2:55:12 PM9/14/10
to munk...@googlegroups.com
I can also confirm what Jason said (the composer package does not require a restart when set to Required). Also, the installer query command only returns proper information for the legal values listed below.

-Gary
On 8/4/10 12:06 PM, "Greg Neagle" < <x-msg://73/gregn...@mac.com>  <mailto:gregn...@mac.com> gregn...@mac.com < <mailto:gregn...@mac.com>  <mailto:gregn...@mac.com> mailto:gregn...@mac.com>  <x-msg: <x-msg://139/gregn...@mac.com>  <mailto://139/gregn...@mac.com> //139/gregn...@mac.com < <mailto://139/gregn...@mac.com>  <mailto://139/gregn...@mac.com> mailto://139/gregn...@mac.com> > > wrote:

makepkginfo should get this from the package.

On the packages you think should have the restart flag set, what does this command output?

installer -query RestartAction -pkg <path_to_a_pkg>

-Greg

On Aug 4, 2010, at 10:00 AM, Gary Bernstein wrote:

I’m getting back to this project now and I noticed that I created a few installers that I believe are set within the installer to require a restart (and running them outside of munki does confirm this information).

I noticed that pkginfo is not listing this info. Where does that information get read from?

I see from the Adobe and iLife examples that there is a key (RestartAction) and strings of RequireRestart and RequireLogout.

Do I need to add these manually (which is fine)? If so, what are the other valid strings. If not, what should be picking up this info. and from where?

Thanks
-Gary

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -- "The reward for work well done is the opportunity to do more."

 -- "I tried, but it didn't work" is a lot better than "I wish I'd tried."

        Gary R. Bernstein        Director of Computer Information & Access
         <x-msg://73/bern...@illinois.edu>  <mailto:bern...@illinois.edu> bern...@illinois.edu < <mailto:bern...@illinois.edu>  <mailto:bern...@illinois.edu> mailto:bern...@illinois.edu>  <x-msg: <x-msg://139/bern...@illinois.edu>  <mailto://139/bern...@illinois.edu> //139/bern...@illinois.edu < <mailto://139/bern...@illinois.edu>  <mailto://139/bern...@illinois.edu> mailto://139/bern...@illinois.edu> >  <x-msg: <x-msg://108/bern...@illinois.edu>  <mailto://108/bern...@illinois.edu> //108/bern...@illinois.edu < <mailto://108/bern...@illinois.edu>  <mailto://108/bern...@illinois.edu> mailto://108/bern...@illinois.edu>  <x-msg: <x-msg://108/bern...@illinois.edu>  <mailto://108/bern...@illinois.edu> //108/bern...@illinois.edu < <mailto://108/bern...@illinois.edu>  <mailto://108/bern...@illinois.edu> mailto://108/bern...@illinois.edu> > >       Krannert Center for the Performing Arts

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -- "The reward for work well done is the opportunity to do more."

 -- "I tried, but it didn't work" is a lot better than "I wish I'd tried."

        Gary R. Bernstein        Director of Computer Information & Access

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -- "The reward for work well done is the opportunity to do more."

 -- "I tried, but it didn't work" is a lot better than "I wish I'd tried."

        Gary R. Bernstein        Director of Computer Information & Access

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -- "The reward for work well done is the opportunity to do more."

 -- "I tried, but it didn't work" is a lot better than "I wish I'd tried."

        Gary R. Bernstein        Director of Computer Information & Access
         <x-msg://73/bern...@illinois.edu>  <mailto:bern...@illinois.edu> bern...@illinois.edu      Krannert Center for the Performing Arts

        217-244-1038                 College of Fine & Applied Arts - UIUC
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Jason Hueske

unread,
Sep 14, 2010, 3:02:39 PM9/14/10
to munk...@googlegroups.com
Of course, I realized as I hit send that naturally the keys will stay the same when sourced through Composer regardless of how they're built. I already have a my build script set to restore sticky bits that Composer ignores, now I'll have to build a quick fix into the script to repair these keys. Yuck. It's just barely convenient enough to keep using...

- Jason


Reply all
Reply to author
Forward
0 new messages