Skip to content

Instantly share code, notes, and snippets.

View stefanlasiewski's full-sized avatar

Stefan Lasiewski stefanlasiewski

  • LBNL (Lawrence Berkeley National Laboratory)
  • Berkeley, CA
View GitHub Profile

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/bootstrap.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@stefanlasiewski
stefanlasiewski / macports-selfupdate.sh
Created May 31, 2013 22:41
Update MacPorts base to latest released version using 'selfupdate', Then upgrade all outdated ports (upgrade outdated), and uninstall old version of each port (-u)
#!/bin/sh
# Update MacPorts base to latest released version using 'selfupdate'
# Then upgrade all outdated ports (upgrade outdated), and uninstall old version of each port (-u)
# http://guide.macports.org/#using.common-tasks.updating
# http://guide.macports.org/#using.port.upgrade
# Can be called from Cron
@stefanlasiewski
stefanlasiewski / gist:5688376
Created May 31, 2013 22:28
Shell script scripts to get hostnames from IPs and VIPs listed in ifconfig
#!/bin/sh
# Shell script scripts to get hostnames from IPs and VIPs listed in ifconfig
# -------------------------------------------------------------------------
# Copyright (c) 2005 nixCraft project <http://cyberciti.biz/fb/>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------
# Based off of http://bash.cyberciti.biz/misc-shell/read-local-ip-address/