Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -x
defaults="/usr/bin/defaults"
touch="/usr/bin/touch"
$defaults write "/Volumes/$DS_LAST_SELECTED_TARGET/Library/Preferences/ManagedInstalls" InstallAppleSoftwareUpdates -bool true
$touch "/Volumes/$DS_LAST_SELECTED_TARGET/Users/Shared/.com.googlecode.munki.checkandinstallatstartup"
exit 0
@arubdesu
arubdesu / Notes.txt
Last active August 29, 2015 14:08
Notes from the Tim Sutton and Graham Gilbert's deployment session
We started by discussing what's new in Yosemite:
Puppet as a tool is unaffected, due to getting over the issues with Rubby 2.0 in Mavericks.
The issues with NetInstall and CreateOSXInstallPkg with the distribution pkg format were discussed, as per:
https://github.com/munki/createOSXinstallPkg#further-note-on-additional-packages-and-yosemite
SCCM hasn't been well know to immediately support OS releases, nor patch broken functionality in a timely fashion.
Re: looking to migrate a DeployStudio repo to a new address but reuse nbi's of older version of the OS was given the option of mounting them as they are read/write, and can therefore be updated for new server location. Another point is you can provide auth to automatically run workflows at the NBI level, which is super cool for lab re-imaging.
@arubdesu
arubdesu / CodeSignatureVerifier-Overridable
Last active August 29, 2015 14:09
Clumsily allowing no-op key to allow skipping of verification if recipe author wouldn't appreciate possible added support load, or otherwise continuing with previous behavior
#!/usr/bin/python
#
# Copyright 2014 Hannes Juutilainen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@arubdesu
arubdesu / Git-Fat_draft.txt
Last active August 29, 2015 14:10
afp548 draft on git-fat, part one - intro
Do you work on munki with a team of folks (meaning more than one)? You probably wish you could use MunkiAdmin for everything, but the server world is turning *nix, and MunkiAdmin is only meant to be super-efficient running on your Mac (whereas mounting the munki repo over the network may be a poor experience as things grow very large). It's sheer luck that Hannes Juutilainen wants to help with all of our workflow needs, so he composed the original page on git usage for the official munki wiki. Git was made for a distributed, (latent) network-aware world, but as the wiki page takes into account by instructing you to create a .gitignore file, it wasn't made to shuttle around large, compressed containers like DMGs and pkgs. If you're pushing 1GB+ disk images with git as the transport mechanism, with every version copied to it's internal storage... <'you're going to have a bad time' South Park meme goes here>
Let's take a step back. In an idealized view of things, you could 1. check out the current version of th
@arubdesu
arubdesu / boxforMac.txt
Created November 26, 2014 20:55
giving box crap for being lame
Them:
"Hi Allister,
At this time, we don't have a built-in silent install option for Mac Sync. Our product and engineering teams are aware of this shortcoming, and may look to prioritize it in the near future. I apologize for the inconvenience here.
Sincerely,"
Hey Support,
I’m not just asking silent, you have no ‘installer’, by which I mean package, at all. Here, we did most of the work for you:
@arubdesu
arubdesu / rotate_key.py
Created December 2, 2014 14:02
mManual rotate process leveraging crypt client tools
#!/usr/bin/env python
import sys
import os
import optparse
import subprocess
import platform
from urllib2 import Request, urlopen, URLError
# TODO: move to NSURL
import urllib
@arubdesu
arubdesu / MoveLocalToAD.sh
Last active August 28, 2016 16:38
CocoaDialog local to AD migration
#!/bin/bash
# Copywright Allister Banks 12/2014, see bottom for license
# Migrate from Local domain to AD, inspiration from
# https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/migrate_local_user_to_AD_domain
CD="$HOME/Applications/CocoaDialog.app/Contents/MacOS/CocoaDialog"
declare -rx dig=/usr/bin/dig
declare -rx dscl=/usr/bin/dscl
declare -rx killall=/usr/bin/killall
declare -rx createmobileaccount="/System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount"
@arubdesu
arubdesu / sonos.download.recipe
Created December 17, 2014 16:24
Autopkg recipe to download the most recent Sonos controller
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>Downloads the current release version of Sonos.</string>
<key>Identifier</key>
<string>com.github.autopkg.download.Sonos</string>
<key>Input</key>
<dict>
@arubdesu
arubdesu / DiagnosticMessagesHistory.plist
Created February 6, 2015 15:06
Assumes plist is in a folder called plist, turns ON submission of crash reports to app developers and Apple
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AutoSubmit</key>
<true/>
<key>AutoSubmitVersion</key>
<integer>4</integer>
<key>ThirdPartyDataSubmit</key>
<true/>
@arubdesu
arubdesu / autopkgMacTechArticleMissingParagraphs.txt
Created February 8, 2015 18:14
Missing paragraphs from the bottom of page 27/top of 28
MOTIVATIONAL SPEECH (JUST KIDDING ABOUT NANO)
Now we'll transition into affecting change for the better in our open source world. For any number of reasons, Autopkg isn't seeing contributions from all corners of the world that are taking advantage of it, and I'd like to help clear up what may be some common barriers to entry. Using version control and code-sharing sites can certainly present a challenge to beginners, so I’d like to help folks get past those initial workflow difficulties. In the process, I'd also like to instruct folks using tools like Munki(2) how they might best pitch in to improve and get the most benefit out of others recipes.
I've recently been far too well known for snarkiness, and that extends to my opinions relating to interacting with version control, and in particular on autopkg's home, GitHub. With my lack-of programming savvy in general I'm probably not really one to cast stones, although really, no greps before awks, c'mon people, get with it, and use vi like the cool kids. (Serio