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 | |
# | |
# this sits and waits for interfaces passed in on the cmdline | |
# to come up and have an ipv4 address. | |
# | |
# note, this would be much easier done in C, i'm not sure how you | |
# could avoid polling, surely there is some way. | |
# | |
# |
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
# | |
# https://gist.github.com/1213005 | |
# | |
svn co http://svn.madwifi-project.org/madwifi/branches/madwifi-0.9.4/ | |
mver="0.9.4" | |
name="madwifi" | |
_outrev=$(cd madwifi-0.9.4 && svn info | grep "^Revision:" | cut -d: -f 2) | |
revno=$(echo $_outrev) |
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 | |
# this was used in testing of block device mapping bugs, ie: | |
# http://pad.lv/851145: ephemeral device (local_gb) does not get a filesystem | |
# http://pad.lv/827598: ephemeral device does not have a filesystem | |
# http://pad.lv/827590: cloud-init does not mount /mnt | |
# http://pad.lv/828357: request to add a label to the filesystem for ephemeral devices | |
# | |
# Usage: | |
# set up the following functions | |
# dorun() { ./cat-bdinfo $* > my-bdinfo; euca-run-instances --user-data-file my-bdinfo --key mykey $*; } |
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 | |
# | |
# This is a user-data script that launches an instance, and then sets | |
# it up to be able to publish a daily or released build as easy as | |
# possible. use: | |
# euca-run-instances <some-ami> --user-data-file <this file> --key mykey | |
# | |
# Then, copy credentials to the instance and read 'README' | |
# | |
# gist: https://gist.github.com/1231973 |
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
/* | |
test-virFileOpen.c | |
This mimics libvirt/src/lxc/lxc_controller.c in lxcControllerRun | |
gcc -o test-virFileOpen test-virFileOpen.c | |
mkdir d | |
sudo ./test-virFileOpen d | |
We get varied results. Sometimes this passes, sometimes it fails. | |
*/ |
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
#!/usr/bin/python | |
""" | |
To use this to mimic the EC2 metadata service entirely, run it like: | |
# where 'eth0' is *some* interface. if i used 'lo:0' i got 5 second or so delays on response. | |
sudo ifconfig eth0:0 169.254.169.254 netmask 255.255.255.255 | |
sudo ./mdserv 169.254.169.254:80 | |
Then: | |
wget -q http://169.254.169.254/latest/meta-data/instance-id -O -; echo | |
curl --silent http://169.254.169.254/latest/meta-data/instance-id ; echo |
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 -e | |
# vi: ts=4 noexpandtab | |
Usage() { | |
cat <<EOF | |
Usage: ${0##*/} [on|off] | |
Enable or disable multiverse in /etc/apt/sources.list | |
EOF | |
} |
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/bash | |
# https://gist.github.com/1367800 | |
CR=$'\n' | |
dns_server="@8.8.8.8" | |
KNOWN=( | |
us-east-1 | |
us-west-1 | |
ap-southeast-1 | |
eu-west-1 |
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/bash | |
# | |
# based off ec2-publishing-scripts 'generate-query-tree', but | |
# updated for my personal publishing habits on a private openstack instance | |
# | |
export LC_ALL=C | |
BUCKET="${PUBLISH_BUCKET:-smoser-cloud-images}" | |
NUM_ARCHES=2 | |
TEMP_D="" |
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
bdir=/archive/local/cobbler | |
pydir=/usr/share/pyshared/cobbler/utils/; | |
snipdir=/var/lib/cobbler/snippets/ | |
mkdir -p $pydir | |
for f in $bdir/snippets/*; do ln -sf $f $snipdir/${f##*/}; done | |
for f in $bdir/pyshared/*; do ln -sf $f $pydir/${f##*/}; done | |
for p in precise-i386 precise-x86_64; do |