Created
September 9, 2011 09:22
-
-
Save javacruft/1205825 to your computer and use it in GitHub Desktop.
Cobbler Daily ARM Netboot Download and install
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 | |
set -e | |
PWD=`pwd` | |
DATE=`date +%Y%m%d` | |
TDIR=`mktemp -d` | |
# Grab OMAP4 netboot images | |
wget -O $TDIR/uImage \ | |
http://ports.ubuntu.com/ubuntu-ports/dists/oneiric/main/installer-armel/current/images/omap4/netboot/uImage | |
wget -O $TDIR/uInitrd \ | |
http://ports.ubuntu.com/ubuntu-ports/dists/oneiric/main/installer-armel/current/images/omap4/netboot/uInitrd | |
# Import the image | |
sudo cobbler import --name=oneiric-${DATE}-omap4-server-arm \ | |
--path=$TDIR --breed=ubuntu --arch=arm \ | |
--os-version=oneiric | |
# Edit the Distro profile to have some good options | |
sudo cobbler profile edit --name=oneiric-${DATE}-omap4-server-arm \ | |
--kickstart=/var/lib/cobbler/kickstarts/ubuntu-server-arm.seed \ | |
--kopts="priority=critical locale=en_GB" | |
DAILY_PROFILE=`sudo cobbler profile list | grep oneiric-server-omap4-arm-basic` | |
if [ -z "$DAILY_PROFILE" ]; then | |
# Create daily profile and associate with latest distro download - plus | |
# associate with a locale preseed | |
sudo cobbler profile add --name=oneiric-server-omap4-arm-basic \ | |
--distro=oneiric-${DATE}-omap4-server-arm --kopts="priority=critical locale=en_GB" \ | |
--kickstart=/var/lib/cobbler/kickstarts/ubuntu-server-arm.seed | |
else | |
# Update 'Latest' profile to point to new distro download | |
sudo cobbler profile edit --name=oneiric-server-omap4-arm-basic \ | |
--distro=oneiric-${DATE}-omap4-server-arm | |
fi | |
# Tidyup | |
rm -Rf $TDIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment