Skip to content

Instantly share code, notes, and snippets.

@ehemmete
ehemmete / LoginFileShareMounter.wrapper.sh
Last active September 23, 2016 19:58
LogonFileShareMounter.py
#!/bin/sh
if [ ! -d /Users/Shared/netlogon ]; then
mkdir /Users/Shared/netlogon
fi
mount_smbfs -o nobrowse //dc.my.domain.com/NETLOGON /Users/Shared/netlogon
if [ ! -e /Users/Shared/netlogon/LoginFileShareMounter.py ]; then
logger -t "myCompany:LoginFileShareMounter" "Cannot find the remote script"
else
storedSerial=$(cat /Library/Scripts/LoginFileShareMounter.py | grep '#serial_number=' | cut -d"=" -f 2)
remoteSerial=$(cat /Users/Shared/netlogon/LoginFileShareMounter.py | grep '#serial_number=' | cut -d"=" -f 2)
#!/usr/bin/python
#serial_number=2016082201
#serial above is yyyymmdd## for when the script is updated
import subprocess
import sys
from SystemConfiguration import SCDynamicStoreCopyConsoleUser
### From https://gist.github.com/pudquick/1362a8908be01e23041d
import objc, CoreFoundation, Foundation
@ehemmete
ehemmete / anyconnect_choices.xml
Created July 26, 2017 17:43
installer -showChoicesXML -pkg /path/to/AnyConnect4.3.pkg -target /
<?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">
<array>
<dict>
<key>childItems</key>
<array>
<dict>
<key>childItems</key>
<array/>
<dict>
<key>childItems</key>
<array/>
<key>choiceDescription</key>
<string>Installs the module that enables Umbrella Roaming Security.</string>
<key>choiceIdentifier</key>
<string>choice_umbrella</string>
<key>choiceIsEnabled</key>
<true/>
<key>choiceIsSelected</key>
<?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">
<array>
</array>
</plist>
<dict>
<key>attributeSetting</key>
<integer>0</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>choice_umbrella</string>
</dict>
<?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">
<array>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<dict>
<key>attributeSetting</key>
<true/>
<key>choiceAttribute</key>
<string>visible</string>
<key>choiceIdentifier</key>
<string>choice_umbrella</string>
</dict>
<dict>
<key>attributeSetting</key>
**************************
Running GenerateProductConfig
A higher version of the agent than 5.0.4.283 is already installed. Agent installation will be skipped
OS Name is MacOSX
OS Minor Version is 12
OS Minor Ver is >= 8
FMPInstall check - retval is 0
Checking if we have FMP already installed
FMP higher build number already installed on this machine. So, installer will skip FMP package installation.
UIInstall Check - retval is 0
<?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">
<array>
<dict>
<key>attributeSetting</key>
<integer>0</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>