From fd6015c4ea6eb1b817c952936924892679bff1d4 Mon Sep 17 00:00:00 2001 From: Gorman Christian Date: Mon, 5 Aug 2019 14:11:47 -0500 Subject: [PATCH 1/3] add -I image option for specifying user image --- createuserpkg | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/createuserpkg b/createuserpkg index 2beefc9..1dc2780 100755 --- a/createuserpkg +++ b/createuserpkg @@ -74,7 +74,9 @@ def main(): help='User account should automatically login.') optional_user_options.add_option('--hidden', action='store_true', help='User account should be hidden.') - + optional_user_options.add_option('--image', '-I', + help='Path to file to be used as user image. This is up to you to ensure it exists before the pkg is run. Optional.') + parser.add_option_group(required_user_options) parser.add_option_group(required_package_options) parser.add_option_group(optional_user_options) @@ -125,7 +127,9 @@ def main(): user_data['IsHidden'] = u'YES' if options.hint: user_data['hint'] = options.hint - + if options.image: + user_data['image_path'] = options.image + user_plist = userplist.generate(user_data) From 10a59cff40e0b01fc2b09bce101d41b47100bdbc Mon Sep 17 00:00:00 2001 From: Gorman Christian Date: Mon, 5 Aug 2019 14:25:31 -0500 Subject: [PATCH 2/3] changed --image to --imagepath to be more clear about what it is expecting for an input - seeing as its not trying to provide JPEG data and someday the tool might --- createuserpkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/createuserpkg b/createuserpkg index 1dc2780..cfef2e9 100755 --- a/createuserpkg +++ b/createuserpkg @@ -74,7 +74,7 @@ def main(): help='User account should automatically login.') optional_user_options.add_option('--hidden', action='store_true', help='User account should be hidden.') - optional_user_options.add_option('--image', '-I', + optional_user_options.add_option('--imagepath', '-I', help='Path to file to be used as user image. This is up to you to ensure it exists before the pkg is run. Optional.') parser.add_option_group(required_user_options) From 4e9cd1bd90a008bc74b93c17bb9c8d4651d86fd5 Mon Sep 17 00:00:00 2001 From: Gorman Christian Date: Mon, 5 Aug 2019 14:26:25 -0500 Subject: [PATCH 3/3] changed --image to --imagepath to be more clear about what it is expecting for an input - seeing as its not trying to provide JPEG data and someday the tool might --- createuserpkg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/createuserpkg b/createuserpkg index cfef2e9..ea2c8d3 100755 --- a/createuserpkg +++ b/createuserpkg @@ -127,8 +127,8 @@ def main(): user_data['IsHidden'] = u'YES' if options.hint: user_data['hint'] = options.hint - if options.image: - user_data['image_path'] = options.image + if options.imagepath: + user_data['image_path'] = options.imagepath user_plist = userplist.generate(user_data)