├── .gitignore ├── ClearReg ├── ClearReg.pkg └── Makefile ├── Desktop_icons ├── Desktop_Icons.pkg ├── File Server.afploc ├── Makefile └── desktop_icons-20140320 ├── Dock ├── Dock.pkg ├── Makefile └── dock-2014-05-23 ├── README.md ├── Wallpaper ├── Makefile ├── Wallpaper.jpg └── Wallpaper.pkg ├── dockutil ├── Makefile ├── dockutil └── dockutil.pkg ├── first-boot ├── first-boot-pkgs │ ├── autotime_zone │ │ ├── AutoTimeZone.pkg │ │ ├── Makefile │ │ └── postinstall │ ├── enable_ard_ssh │ │ ├── Enable_ARD_SSH.pkg │ │ ├── Makefile │ │ └── postinstall │ ├── network_time │ │ ├── Enable_Network_Time.pkg │ │ ├── Makefile │ │ └── postinstall │ ├── printer │ │ ├── Configure_HP_Printer.pkg │ │ ├── Makefile │ │ └── postinstall │ └── set_timezone │ │ ├── Makefile │ │ ├── Set_UK_Timezone.pkg │ │ └── postinstall └── settings.plist ├── local_admin_user └── create_localadmin-1.0.pkg ├── office_profiles ├── Error_Reporting │ ├── Office2011ErrorReporting-2014.06.16.pkg │ ├── Office2011ErrorReporting.mobileconfig │ └── Office2011ErrorReporting_uninstall.sh ├── Office2011 │ ├── Office2011-2014.06.16.pkg │ ├── Office2011.mobileconfig │ └── Office2011_uninstall.sh └── Update_Prefs │ ├── Office2011UpdatePrefs-2014.06.16.pkg │ ├── Office2011UpdatePrefs.mobileconfig │ └── Office2011UpdatePrefs_uninstall.sh ├── scriptRunner ├── Makefile ├── com.grahamgilbert.scriptrunner.plist └── scriptRunnerPkg.pkg ├── set_desktops ├── Makefile ├── set_desktops.pkg ├── set_desktops.py └── set_wallpaper-20140320 └── skip_icloud ├── com.grahamgilbert.icloud_assistant-2014.06.18.pkg ├── com.grahamgilbert.icloud_assistant.mobileconfig └── com.grahamgilbert.icloud_assistant_uninstall.sh /.gitignore: -------------------------------------------------------------------------------- 1 | first-boot/first-boot-pkgs/Office 2011/Office 2011 14.4.2 Update.pkg 2 | first-boot/first-boot-pkgs/Office 2011/Office Installer-14.3.0.pkg 3 | Software 4 | -------------------------------------------------------------------------------- /ClearReg/ClearReg.pkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grahamgilbert/automate_psu_2014/876b1f1b6a6e9b52f55e2025765ed13c86083f26/ClearReg/ClearReg.pkg -------------------------------------------------------------------------------- /ClearReg/Makefile: -------------------------------------------------------------------------------- 1 | USE_PKGBUILD=1 2 | include /usr/local/share/luggage/luggage.make 3 | 4 | TITLE=ClearReg 5 | PACKAGE_NAME=ClearReg 6 | REVERSE_DOMAIN=com.grahamgilbert 7 | PAYLOAD=\ 8 | pack-AppleSetupDone \ 9 | pack-SetupRegComplete 10 | 11 | pack-AppleSetupDone: 12 | @sudo mkdir -p ${WORK_D}/var/db/ 13 | @sudo touch ${WORK_D}/var/db/.AppleSetupDone 14 | @sudo chown root:wheel ${WORK_D}/var/db/.AppleSetupDone 15 | 16 | pack-SetupRegComplete: 17 | @sudo mkdir -p ${WORK_D}/Library/Receipts/ 18 | @sudo touch ${WORK_D}/Library/Receipts/.SetupRegComplete 19 | @sudo chown root:wheel ${WORK_D}/Library/Receipts/.SetupRegComplete -------------------------------------------------------------------------------- /Desktop_icons/Desktop_Icons.pkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grahamgilbert/automate_psu_2014/876b1f1b6a6e9b52f55e2025765ed13c86083f26/Desktop_icons/Desktop_Icons.pkg -------------------------------------------------------------------------------- /Desktop_icons/File Server.afploc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grahamgilbert/automate_psu_2014/876b1f1b6a6e9b52f55e2025765ed13c86083f26/Desktop_icons/File Server.afploc -------------------------------------------------------------------------------- /Desktop_icons/Makefile: -------------------------------------------------------------------------------- 1 | USE_PKGBUILD=1 2 | include /usr/local/share/luggage/luggage.make 3 | 4 | TITLE=Desktop_Icons 5 | PACKAGE_NAME=${TITLE} 6 | REVERSE_DOMAIN=com.grahamgilbert 7 | PACKAGE_VERSION=1.0 8 | PAYLOAD=\ 9 | pack-Library-Management-scriptRunner-once-desktop_icons-20140320 \ 10 | pack-file_server 11 | 12 | l_Library_Management: l_Library 13 | @sudo mkdir -p ${WORK_D}/Library/Management 14 | @sudo chown root:wheel ${WORK_D}/Library/Management 15 | @sudo chmod 755 ${WORK_D}/Library/Management 16 | 17 | l_Library_Management_bin: l_Library_Management 18 | @sudo mkdir -p ${WORK_D}/Library/Management/bin 19 | @sudo chown root:wheel ${WORK_D}/Library/Management/bin 20 | @sudo chmod 755 ${WORK_D}/Library/Management/bin 21 | 22 | l_Library_Management_scriptRunner: l_Library_Management 23 | @sudo mkdir -p ${WORK_D}/Library/Management/scriptRunner 24 | @sudo chown root:wheel ${WORK_D}/Library/Management/scriptRunner 25 | @sudo chmod 755 ${WORK_D}/Library/Management/scriptRunner 26 | 27 | l_Library_Management_scriptRunner_once: l_Library_Management_scriptRunner 28 | @sudo mkdir -p ${WORK_D}/Library/Management/scriptRunner/once 29 | @sudo chown root:wheel ${WORK_D}/Library/Management/scriptRunner/once 30 | @sudo chmod 755 ${WORK_D}/Library/Management/scriptRunner/once 31 | 32 | pack-Library-Management-scriptRunner-once-%: % l_Library_Management_scriptRunner_once 33 | @sudo ${INSTALL} -m 755 -g wheel -o root "${<}" ${WORK_D}/Library/Management/scriptRunner/once 34 | 35 | pack-file_server: l_Library_Management 36 | @sudo mkdir -p ${WORK_D}/Library/Management/Desktop_Icons 37 | @sudo chown root:wheel ${WORK_D}/Library/Management/Desktop_Icons 38 | @sudo chmod 755 ${WORK_D}/Library/Management/Desktop_Icons 39 | @sudo ${CP} File\ Server.afploc ${WORK_D}/Library/Management/Desktop_Icons/File\ Server.afploc 40 | @sudo chown root:wheel ${WORK_D}/Library/Management/Desktop_Icons/File\ Server.afploc 41 | @sudo chmod 644 ${WORK_D}/Library/Management/Desktop_Icons/File\ Server.afploc 42 | -------------------------------------------------------------------------------- /Desktop_icons/desktop_icons-20140320: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cp /Library/Management/Desktop_Icons/File\ Server.afploc ~/Desktop/File\ Server.afploc -------------------------------------------------------------------------------- /Dock/Dock.pkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grahamgilbert/automate_psu_2014/876b1f1b6a6e9b52f55e2025765ed13c86083f26/Dock/Dock.pkg -------------------------------------------------------------------------------- /Dock/Makefile: -------------------------------------------------------------------------------- 1 | USE_PKGBUILD=1 2 | include /usr/local/share/luggage/luggage.make 3 | 4 | TITLE=Dock 5 | PACKAGE_NAME=${TITLE} 6 | REVERSE_DOMAIN=com.grahamgilbert 7 | PACKAGE_VERSION=1.0 8 | PAYLOAD=\ 9 | pack-Library-Management-scriptRunner-once-dock-2014-05-23 10 | 11 | l_Library_Management: l_Library 12 | @sudo mkdir -p ${WORK_D}/Library/Management 13 | @sudo chown root:wheel ${WORK_D}/Library/Management 14 | @sudo chmod 755 ${WORK_D}/Library/Management 15 | 16 | l_Library_Management_bin: l_Library_Management 17 | @sudo mkdir -p ${WORK_D}/Library/Management/bin 18 | @sudo chown root:wheel ${WORK_D}/Library/Management/bin 19 | @sudo chmod 755 ${WORK_D}/Library/Management/bin 20 | 21 | l_Library_Management_scriptRunner: l_Library_Management 22 | @sudo mkdir -p ${WORK_D}/Library/Management/scriptRunner 23 | @sudo chown root:wheel ${WORK_D}/Library/Management/scriptRunner 24 | @sudo chmod 755 ${WORK_D}/Library/Management/scriptRunner 25 | 26 | l_Library_Management_scriptRunner_once: l_Library_Management_scriptRunner 27 | @sudo mkdir -p ${WORK_D}/Library/Management/scriptRunner/once 28 | @sudo chown root:wheel ${WORK_D}/Library/Management/scriptRunner/once 29 | @sudo chmod 755 ${WORK_D}/Library/Management/scriptRunner/once 30 | 31 | pack-Library-Management-scriptRunner-once-%: % l_Library_Management_scriptRunner_once 32 | @sudo ${INSTALL} -m 755 -g wheel -o root "${<}" ${WORK_D}/Library/Management/scriptRunner/once 33 | -------------------------------------------------------------------------------- /Dock/dock-2014-05-23: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DOCKUTIL=/usr/local/bin/dockutil 4 | 5 | $DOCKUTIL --remove all 6 | 7 | $DOCKUTIL --add '/Applications/Google chrome.app' --no-restart 8 | 9 | $DOCKUTIL --add '/Applications/Safari.app' --no-restart 10 | 11 | $DOCKUTIL --add '/Applications/Microsoft Office 2011/Microsoft Word.app' --no-restart 12 | 13 | $DOCKUTIL --add '/Applications/Microsoft Office 2011/Microsoft Excel.app' --no-restart 14 | 15 | $DOCKUTIL --add '/Applications/Keynote.app' --no-restart 16 | 17 | $DOCKUTIL --add '/Applications' --no-restart 18 | 19 | $DOCKUTIL --add '~/Downloads' 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Automate yourself out of a job 2 | ============ 3 | 4 | All of the packages here were made using [The Luggage](https://github.com/unixorn/luggage). Everything seen in the talk, with the exception of commercial software is in this repository. The password for the admin user package is ``password``. 5 | 6 | ## Further Reading 7 | 8 | * [A tutorial on LaunchD](http://launchd.info) 9 | * [An introduction to The Luggage](http://grahamgilbert.com/blog/2013/08/09/the-luggage-an-introduction/ ) 10 | * [The Luggage: Further automation](http://grahamgilbert.com/blog/2013/08/19/the-luggage-further-automation) 11 | * [Using MCX with Office 2011](http://www.officeformachelp.com/office/administration/mcx) 12 | * [Understanding payload free packages](http://derflounder.wordpress.com/2014/06/01/understanding-payload-free-packages/) 13 | * [Apple Installer bundle-style package script variables](https://gist.github.com/Jaharmi/cb9aa0e19b80279c17e8) 14 | * [Building simple packages with Packages](http://derflounder.wordpress.com/2014/05/02/building-simple-packages-with-packages/) 15 | * [Prepare Office 2011 for InstaDMG / AutoDMG](http://www.nbalonso.com/prepare-office-sp3-for-instadmg/) 16 | * [Making packages with AutoPkg](http://grahamgilbert.com/blog/2014/06/30/making-packages-with-autopkg/) 17 | * [Configuring ARD with Kickstart](http://support.apple.com/kb/ht2370) 18 | * [Getting started with Munki](https://code.google.com/p/munki/wiki/GettingStartedWithMunki ) 19 | * [ Getting started with AutoPKG](https://github.com/autopkg/autopkg/wiki/Getting-Started) -------------------------------------------------------------------------------- /Wallpaper/Makefile: -------------------------------------------------------------------------------- 1 | USE_PKGBUILD=1 2 | include /usr/local/share/luggage/luggage.make 3 | 4 | TITLE=Wallpaper 5 | PACKAGE_NAME=${TITLE} 6 | REVERSE_DOMAIN=com.grahamgilbert 7 | PAYLOAD=\ 8 | pack-wallpaper 9 | 10 | l_Library_Management: l_Library 11 | @sudo mkdir -p ${WORK_D}/Library/Management 12 | @sudo chown root:wheel ${WORK_D}/Library/Management 13 | @sudo chmod 755 ${WORK_D}/Library/Management 14 | 15 | l_Library_Management_Wallpaper: l_Library_Management 16 | @sudo mkdir -p ${WORK_D}/Library/Management/Wallpaper 17 | @sudo chown root:wheel ${WORK_D}/Library/Management/Wallpaper 18 | @sudo chmod 755 ${WORK_D}/Library/Management/Wallpaper 19 | 20 | pack-wallpaper: l_Library_Management_Wallpaper 21 | @sudo ${CP} Wallpaper.jpg ${WORK_D}/Library/Management/Wallpaper/Wallpaper.jpg 22 | @sudo chown root:wheel ${WORK_D}/Library/Management/Wallpaper/Wallpaper.jpg 23 | @sudo chmod 644 ${WORK_D}/Library/Management/Wallpaper/Wallpaper.jpg 24 | -------------------------------------------------------------------------------- /Wallpaper/Wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grahamgilbert/automate_psu_2014/876b1f1b6a6e9b52f55e2025765ed13c86083f26/Wallpaper/Wallpaper.jpg -------------------------------------------------------------------------------- /Wallpaper/Wallpaper.pkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grahamgilbert/automate_psu_2014/876b1f1b6a6e9b52f55e2025765ed13c86083f26/Wallpaper/Wallpaper.pkg -------------------------------------------------------------------------------- /dockutil/Makefile: -------------------------------------------------------------------------------- 1 | USE_PKGBUILD=1 2 | include /usr/local/share/luggage/luggage.make 3 | 4 | TITLE=dockutil 5 | PACKAGE_NAME=${TITLE} 6 | REVERSE_DOMAIN=com.grahamgilbert 7 | PACKAGE_VERSION=1.0 8 | PAYLOAD=\ 9 | pack-usr-local-bin-dockutil -------------------------------------------------------------------------------- /dockutil/dockutil: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # Copyright 2008 Kyle Crawford 4 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # Send bug reports and comments to kcrwfrd at gmail 18 | 19 | # Possible future enhancements 20 | # tie in with application identifier codes for locating apps and replacing them in the dock with newer versions? 21 | 22 | import sys, plistlib, subprocess, os, getopt, re, pipes 23 | from random import randrange 24 | 25 | 26 | # default verbose printing to off 27 | verbose = False 28 | version = '1.1.4' 29 | 30 | def usage(e=None): 31 | """Displays usage information and error if one occurred""" 32 | name = os.path.basename(sys.argv[0]) 33 | 34 | print "usage: %s -h" % (name,) 35 | print "usage: %s --add | [--label