Skip to content

Instantly share code, notes, and snippets.

View kelp's full-sized avatar

Travis Cole kelp

View GitHub Profile
#!/bin/bash
#
# Backup this hosts MySQL databases using LVM snapshots.
#
if [ ! $1 ]; then
echo "snap-backup <snapshot size in GB>"
vgdisplay `hostname` | grep Free
exit 1
fi
#!/bin/bash
#
# Generate the pxelinux config for new systems.
#
#set -e
usage(){
cat << EOF
#### Contents of the preconfiguration file
### Localization
# Locale sets language and country.
d-i debian-installer/locale string en_US
# Keyboard selection.
# Disable automatic (interactive) keymap detection.
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
SERIAL 0 9600 0
DISPLAY ubuntu-installer/amd64/boot-screens/boot.txt
F1 ubuntu-installer/amd64/boot-screens/f1.txt
F2 ubuntu-installer/amd64/boot-screens/f2.txt
F3 ubuntu-installer/amd64/boot-screens/f3.txt
F4 ubuntu-installer/amd64/boot-screens/f4.txt
F5 ubuntu-installer/amd64/boot-screens/f5.txt
F6 ubuntu-installer/amd64/boot-screens/f6.txt
F7 ubuntu-installer/amd64/boot-screens/f7.txt
# Last modified 2008/09/30 01:30PM - kelp
# If the http response code is 404 or 500 don't allow caching and
# exit the script.
$rawurl = http.getRawURL();
$code = http.getResponseCode();
if ( $code == 404 || $code == 500 ) {
http.setResponseHeader( "Pragma", "no-cache" );
http.removeResponseHeader( "Expires" );
http.setResponseHeader( "Cache-Control", "public, max-age=0" );
# Last modified 2008/09/30 01:30PM - kelp
# If the http response code is 404 or 500 don't allow caching and
# exit the script.
$code = http.getResponseCode();
if ( $code == 404 || $code == 500 ) {
http.setResponseHeader( "Pragma", "no-cache" );
http.removeResponseHeader( "Expires" );
http.setResponseHeader( "Cache-Control", "public, max-age=0" );
http.setResponseHeader( "Expires", sys.gmtime.format( "%a, %d %b %Y %T GMT" ) );
--- cpu 2008-10-17 16:08:16.000000000 -0700
+++ cpu.orig 2008-10-17 11:58:33.000000000 -0700
@@ -116,7 +116,7 @@
$u_col = 2;
$s_col = 4;
$io_col = 5;
- $id_col = -1;
+ $id_col = 6;
} else {
# HP-UX and Solaris are the same
#!/bin/sh
#
# Run the last bits of setup on a new autoinstalled system.
#
. /target/etc/lsb-release
printf "\n\t\t\tiLike - $DISTRIB_DESCRIPTION $DISTRIB_CODENAME\n\n\n" > /target/etc/motd.tail
wget -O /target/etc/apt/sources.list http://10.1.1.1/sources.list
in-target apt-get update
#### Contents of the preconfiguration file
### Localization
# Locale sets language and country.
d-i debian-installer/locale string en_US
# Keyboard selection.
# Disable automatic (interactive) keymap detection.
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
#!/usr/bin/env bash
#
# Setup a proceess to run from runit in the ilike users home dir
#
# For more information about runit see: http://smarden.org/runit/
#
export SVDIR=~/service/
progname=$(basename $0)