mirror of https://github.com/dirtbags/moth.git
A couple of bugfixes and install script
This commit is contained in:
parent
59eb9d4689
commit
e25515dc56
7
Makefile
7
Makefile
|
@ -13,6 +13,13 @@ BIN = bin
|
|||
|
||||
all: packages
|
||||
|
||||
dist: ctf-install.zip
|
||||
ctf-install.zip: packages.zip /usr/lib/syslinux/mbr.bin
|
||||
zip --junk-paths $@ packages.zip /usr/lib/syslinux/mbr.bin install.sh
|
||||
|
||||
packages.zip: packages bzImage rootfs.squashfs
|
||||
zip --junk-paths $@ bin/*.pkg bzImage rootfs.squashfs
|
||||
|
||||
clean: packages-clean
|
||||
rm -rf $(BUILD) $(TARGET) $(BIN)
|
||||
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
#! /bin/sh -e
|
||||
|
||||
DRIVE=$1
|
||||
if ! [ -b "$DRIVE" ]; then
|
||||
echo "Usage: $0 DEVICE"
|
||||
echo
|
||||
echo "Prepares DEVICE with Capture The Flag goodness"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
FATFS=${DRIVE}1
|
||||
EXTFS=${DRIVE}2
|
||||
|
||||
sfdisk $DRIVE <<EOF
|
||||
0,60,6,*
|
||||
,,L
|
||||
EOF
|
||||
sync
|
||||
|
||||
mkdir -p /mnt/ctf-install
|
||||
|
||||
mkdosfs -n PACKAGES $FATFS
|
||||
mke2fs -j -L VAR $EXTFS
|
||||
|
||||
cat mbr.bin > $DRIVE
|
||||
mount $FATFS /mnt/ctf-install
|
||||
mkdir /mnt/ctf-install/syslinux
|
||||
umount /mnt/ctf-install
|
||||
syslinux -d syslinux $FATFS
|
||||
|
||||
mount $FATFS /mnt/ctf-install
|
||||
cp rootfs.squashfs /mnt/ctf-install/syslinux/dbtl.squashfs
|
||||
cp bzImage /mnt/ctf-install/syslinux/
|
||||
|
||||
cat <<EOD >/mnt/ctf-install/syslinux/syslinux.cfg
|
||||
DEFAULT ctf
|
||||
LABEL ctf
|
||||
KERNEL bzImage
|
||||
INITRD dbtl.squashfs
|
||||
EOD
|
||||
|
||||
cp $(basename $0)/../bin/*.pkg /mnt/ctf-install
|
||||
umount /mnt/ctf-install
|
||||
rmdir /mnt/ctf-install
|
||||
|
||||
sync
|
||||
|
||||
echo "Done"
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
|
||||
if [ "$1" -ne "-f" ]; then
|
||||
if [ "$1" != "-f" ]; then
|
||||
echo "Usage: $0 -f"
|
||||
echo
|
||||
echo "Wipes out the current contest. This operation is not"
|
||||
|
|
|
@ -2,4 +2,7 @@ posters-source:
|
|||
posters-build:
|
||||
|
||||
posters-install: packages/posters/tokens.txt
|
||||
mkdir -p $(TARGET)/posters/
|
||||
cp $< $(TARGET)/posters/
|
||||
|
||||
PACKAGES += posters
|
||||
|
|
Loading…
Reference in New Issue