This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
################################################################################### | |
## Create a pwpolicy XML file based upon variables and options included below. | |
## Policy is applied and then file gets deleted. | |
## Use "sudo pwpolicy -u <user> -getaccountpolicies" | |
## to see it, and "sudo pwpolicy -u <user> -clearaccountpolicies" to clear it. | |
## | |
## Tested on: OS X 10.10 10.11 10.12 | |
#################################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## do this before hand | |
## vyatta will try to eval show under the wrong circumstances | |
show dhcp leases > /tmp/leases.txt | |
### dump below in a file, execute with bash | |
MY_INTERNAL_DOMAIN=local | |
IFS=$'\n' | |
for line in $(printf "$(cat /tmp/leases.txt|tail -n +3|awk '{print $6, $1, $2}')") | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
package_update: true | |
package_upgrade: true | |
package_reboot_if_required: true | |
manage-resolv-conf: true | |
resolv_conf: | |
nameservers: | |
- '8.8.8.8' |