mirror of
https://github.com/munki/munki.git
synced 2026-04-23 13:29:26 -05:00
Added '--RestartAction' option to 'makepkginfo'
Valid actions that can be specified are: RequireRestart RequireLogout RecommendRestart
This commit is contained in:
@@ -345,6 +345,15 @@ def main():
|
||||
Specify a date after which the package will be forcefully installed.
|
||||
|
||||
Example: '2011-08-03T13:00:00Z' equates to August 3rd 2011 at 1PM.''')
|
||||
p.add_option('--RestartAction',
|
||||
metavar='ACTION',
|
||||
help='''Optional flag.
|
||||
|
||||
Specify a 'RestartAction' for the package.
|
||||
|
||||
RequireRestart
|
||||
RequireLogout
|
||||
RecommendRestart''')
|
||||
p.add_option('--destinationpath', '-d',
|
||||
help='''Optional flag.
|
||||
|
||||
@@ -659,6 +668,10 @@ def main():
|
||||
force_install_after_date = munkicommon.validateForceInstallAfterDateFormat(options.force_install_after_date)
|
||||
if force_install_after_date:
|
||||
catinfo['force_install_after_date'] = force_install_after_date
|
||||
if options.RestartAction:
|
||||
validActions=['RequireRestart','RequireLogout','RecommendRestart']
|
||||
if options.RestartAction in validActions:
|
||||
catinfo['RestartAction'] = options.RestartAction
|
||||
|
||||
# and now, what we've all been waiting for...
|
||||
print FoundationPlist.writePlistToString(catinfo)
|
||||
|
||||
Reference in New Issue
Block a user