[28453] in Source-Commits
installer commit: Dynamically generate debathena.preseed
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Mon Sep 29 11:14:20 2014
Date: Mon, 29 Sep 2014 11:14:13 -0400
From: Jonathan D Reed <jdreed@mit.edu>
Message-Id: <201409291514.s8TFED7s010459@drugstore.mit.edu>
To: source-commits@mit.edu
https://github.com/mit-athena/installer/commit/429c6ff0874618b2c8c9fd9a67f0beb157457917
commit 429c6ff0874618b2c8c9fd9a67f0beb157457917
Author: Jonathan Reed <jdreed@mit.edu>
Date: Fri Sep 12 12:46:05 2014 -0400
Dynamically generate debathena.preseed
Remove debathena.preseed from version control, and dynamically
generate it in the Makefile. This allows for easy deployment to other
directories or servers for testing. Declare the target as PHONY to
ensure it runs each time. Also, remove the file in the "clean"
target.
pxe/stage1/Makefile | 8 +++++++-
pxe/stage1/debathena.preseed | 4 ----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/pxe/stage1/Makefile b/pxe/stage1/Makefile
index 3009347..2d1cef7 100644
--- a/pxe/stage1/Makefile
+++ b/pxe/stage1/Makefile
@@ -1,5 +1,7 @@
# This is pretty dangerous in a bunch of ways. Approach with caution.
d=/afs/athena.mit.edu/system/athena10/installer/stage1
+SERVERIP=18.9.60.73
+INSTALLER=stage1
default:
: Use "make install" to move this from where the installer will fetch it.
@@ -17,6 +19,9 @@ host.amd64: host/host.c
host.i386: host/host.c
gcc -m32 -static host/host.c -lcares -o $@
+debathena.preseed:
+ @echo "d-i preseed/include_command string wget -q http://$(SERVERIP)/installer/$(INSTALLER)/debathena-loader.sh ; sh debathena-loader.sh" > $@
+
${d}/debathena.tar.gz: debathena.preseed debathena-loader.sh debathena
git rev-parse --short HEAD > debathena/version
tar czvf ${d}/debathena.tar.gz --exclude "*~" debathena
@@ -25,5 +30,6 @@ ${d}/debathena.tar.gz: debathena.preseed debathena-loader.sh debathena
clean:
rm -f host.amd64 host.i386
rm -rf debathena/lib
+ rm debathena.preseed
-.PHONY: clean install host
+.PHONY: clean install host debathena.preseed
diff --git a/pxe/stage1/debathena.preseed b/pxe/stage1/debathena.preseed
deleted file mode 100644
index afb4681..0000000
--- a/pxe/stage1/debathena.preseed
+++ /dev/null
@@ -1,4 +0,0 @@
-# Minimal preseed, designed to just punt to our own network-based installer.
-# 18.92.2.195 = athena10.mit.edu
-# 18.9.60.73 = new athena10.mit.edu
-d-i preseed/include_command string wget -q http://18.9.60.73/installer/stage1/debathena-loader.sh ; sh debathena-loader.sh