26. December 2010 · Comments Off on Script to do IPv6 DNS updates via DNSSEC. · Categories: Linux Scripts · Tags: , , , ,
#!/bin/bash
## Created by: deaves
# IPv6 DNS update via DNSSEC.
#
## Requires: bind9utils, dnsutils
 
KEYFILE="<dnssec keyfile>"
 
### Server Vars ###
SERVER="<dns Server>"
DOMAIN="<domain to update>"
TTL="3600"
PTRNET="0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa"
 
### Host Vars ###
HOST="$(hostname -s)"
IPv6="$(/sbin/ifconfig | grep Global$ | sed 's/.*[^: ]*: //;s/\/.*//')"
PTR="$(nslookup ${IPv6} | sed 's/ip6.arpa.*/ip6.arpa/' | awk '{print $NF}' | grep arpa$)"
 
### Run nsupdate ###
nsupdate -v -k ${KEYFILE} < < _EOF_
        server ${SERVER}
        update delete ${HOST}.${DOMAIN} AAAA
        update add ${HOST}.${DOMAIN} ${TTL} AAAA ${IPv6}
        `ssh-keygen -r ${HOST} | sed 's/'${HOST}'/'update\ add\ ${HOST}.${DOMAIN}\ ${TTL}'/'`
        send
` ### Update PTR record if in network ###
if [ "$(echo ${PTR} | cut -c 33-72)" == "${PTRNET}" ]; then
  echo "   update delete ${PTR} PTR"
  echo "   update add ${PTR} ${TTL} PTR ${HOST}.${DOMAIN}"
  echo "   send"
fi`
_EOF_

18. December 2010 · Comments Off on Upgrading and managing installed Python packages · Categories: Linux Admin · Tags: ,

Make sure python-setuptools is installed on system.

Install Yolk to query installed packages: easy_install yolk
Check PyPI for updates on packages: yolk -U

easy_install can be used to upgrade any installed package … yolk -a | cut -d ‘ ‘ -f 1 | xargs easy_install -U