| Line | |
|---|
| 1 | # This is part of vtest, by Karl Ramm. This file is in the public domain. |
|---|
| 2 | # |
|---|
| 3 | # (I mean, it's a makefile. There's no art or invention, at least in this one.) |
|---|
| 4 | #BOOTTAR=http://debian.lcs.mit.edu/debian/dists/lenny/main/installer-i386/current/images/netboot/netboot.tar.gz |
|---|
| 5 | BOOTTAR=http://debian.lcs.mit.edu/debian/dists/squeeze/main/installer-i386/current/images/netboot/netboot.tar.gz |
|---|
| 6 | |
|---|
| 7 | all: preseed.cfg tftpboot initrd.gz |
|---|
| 8 | |
|---|
| 9 | netboot.tar.gz: |
|---|
| 10 | wget $(BOOTTAR) |
|---|
| 11 | |
|---|
| 12 | tftpboot: netboot.tar.gz |
|---|
| 13 | mkdir tftpboot |
|---|
| 14 | tar xvzfC netboot.tar.gz tftpboot |
|---|
| 15 | install files/C00002 tftpboot/pxelinux.cfg |
|---|
| 16 | touch tftpboot |
|---|
| 17 | |
|---|
| 18 | initrd.gz: tftpboot preseed.cfg |
|---|
| 19 | -sudo $(RM) -r initrd.expanded |
|---|
| 20 | mkdir initrd.expanded |
|---|
| 21 | (cd initrd.expanded && zcat ../tftpboot/debian-installer/i386/initrd.gz | sudo cpio -i --no-absolute-filenames) |
|---|
| 22 | cp preseed.cfg initrd.expanded |
|---|
| 23 | (cd initrd.expanded && find | cpio -o -H newc | gzip -v9 > ../initrd.gz) |
|---|
| 24 | -sudo $(RM) -r initrd.expanded |
|---|
| 25 | |
|---|
| 26 | ssh_key.pub ssh_key: |
|---|
| 27 | ssh-keygen -N '' -C 'test key' -f ssh_key -t rsa |
|---|
| 28 | |
|---|
| 29 | preseed.cfg: preseed.cfg.in ssh_key.pub |
|---|
| 30 | sed -e 's,@TEST_KEY@,$(shell cat ssh_key.pub),' preseed.cfg.in > preseed.cfg |
|---|
| 31 | |
|---|
| 32 | .PHONY: clean |
|---|
| 33 | clean: |
|---|
| 34 | $(RM) -r netboot.tar.gz tftpboot initrd.gz preseed.cfg |
|---|
| 35 | |
|---|
| 36 | .PHONY: clean-all |
|---|
| 37 | clean-all: clean |
|---|
| 38 | $(RM) ssh_key.pub ssh_key |
|---|
Note: See
TracBrowser
for help on using the repository browser.