diff options
Diffstat (limited to 'genome-repo/genome-repo-1.0.0')
-rw-r--r-- | genome-repo/genome-repo-1.0.0/Cloud.ks (renamed from genome-repo/genome-repo-1.0.0/GenomeCloud.ks) | 0 | ||||
-rw-r--r-- | genome-repo/genome-repo-1.0.0/Genome.ks (renamed from genome-repo/genome-repo-1.0.0/GenomeRepo.ks) | 0 | ||||
-rwxr-xr-x | genome-repo/genome-repo-1.0.0/genome-repo-bootstrap | 59 |
3 files changed, 44 insertions, 15 deletions
diff --git a/genome-repo/genome-repo-1.0.0/GenomeCloud.ks b/genome-repo/genome-repo-1.0.0/Cloud.ks index b3fdbf8..b3fdbf8 100644 --- a/genome-repo/genome-repo-1.0.0/GenomeCloud.ks +++ b/genome-repo/genome-repo-1.0.0/Cloud.ks diff --git a/genome-repo/genome-repo-1.0.0/GenomeRepo.ks b/genome-repo/genome-repo-1.0.0/Genome.ks index 8866eaa..8866eaa 100644 --- a/genome-repo/genome-repo-1.0.0/GenomeRepo.ks +++ b/genome-repo/genome-repo-1.0.0/Genome.ks diff --git a/genome-repo/genome-repo-1.0.0/genome-repo-bootstrap b/genome-repo/genome-repo-1.0.0/genome-repo-bootstrap index 2b532d4..f74e243 100755 --- a/genome-repo/genome-repo-1.0.0/genome-repo-bootstrap +++ b/genome-repo/genome-repo-1.0.0/genome-repo-bootstrap @@ -13,22 +13,51 @@ [ -z "$HOME" ] && export HOME=/ case "$1" in - start) + start) /usr/bin/puppet --logdest=syslog /etc/genome/bootstrap.pp - - RETVAL=$? - - if [ "$RETVAL" -eq 0 ]; then - action "" /bin/true - else - action "" /bin/false - fi - - exit 0 - ;; - *) - echo $"Usage: $0 {start}" - RETVAL=1 + + # If this is a respin machine, try to automatically configure it + if [ -e /etc/sysconfig/genome-respin ]; then + # Create a working directory for the sync + mkdir ~/sync + pushd ~/sync + # Sync from the public Genome repositories + git clone git://git.fedorahosted.org/git/genome + pushd genome + git submodule init + git submodule update + + # Update the current machine with the public contents + genome-sync save --workingdir="$PWD" + + # Prime cobbler with the default profile + cp tools/genome-respin/cobbler/Fedora-`uname -i`.profiles /var/lib/cobbler/profiles + + # Prime cobbler with the default repos + cp tools/genome-respin/cobbler/Fedora-`uname -i`.repos /var/lib/cobbler/repos + + # Sync up all the files + cobbler sync + popd + popd + + # Remove the file so this only runs once + /bin/rm -f /etc/sysconfig/genome-respin + fi + + RETVAL=$? + + if [ "$RETVAL" -eq 0 ]; then + action "" /bin/true + else + action "" /bin/false + fi + + exit 0 + ;; + *) + echo $"Usage: $0 {start}" + RETVAL=1 esac exit $RETVAL |