s/sbin/bin/ for fire-ip

This commit is contained in:
Neale Pickett 2012-06-09 15:50:45 -06:00
parent 40acfe07cc
commit d7a225dc51
28 changed files with 54 additions and 68 deletions

22
packages/00common/eris.mk Normal file
View File

@ -0,0 +1,22 @@
##
## This is a non-package, for building eris httpd, which
## several packages use. Just depend on $(ERIS_BIN), and
## copy it wherever you want in your install rule.
##
ERIS_CACHE = $(CACHE)/eris.git
ERIS_BUILDDIR = $(BUILD)/eris
ERIS_URL = http://woozle.org/~neale/projects/eris
ERIS_BIN := $(ERIS_BUILDDIR)/eris
$(ERIS_CACHE):
git clone --bare $(ERIS_URL) $@
$(ERIS_BUILDDIR): $(ERIS_CACHE)
git clone $< $@
eris: $(ERIS_BIN)
$(ERIS_BIN): $(ERIS_BUILDDIR)
make -C $<

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
/opt/00admin/sbin/fire-ip del /opt/00admin/bin/fire-ip del

View File

@ -2,6 +2,6 @@
exec 2>&1 exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip add) IP=$(/opt/00admin/bin/fire-ip add)
exec setuidgid nobody /opt/cowbull/bin/cowd < /opt/cowbull/tokens.txt exec setuidgid nobody /opt/cowbull/bin/cowd < /opt/cowbull/tokens.txt

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
/opt/00admin/sbin/fire-ip del /opt/00admin/bin/fire-ip del

View File

@ -2,6 +2,6 @@
exec 2>&1 exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip add) IP=$(/opt/00admin/bin/fire-ip add)
exec tcpsvd -u nobody ${IP%/*} 1013 ./go exec tcpsvd -u nobody ${IP%/*} 1013 ./go

View File

@ -1,24 +1,14 @@
INFERNO_PKGDIR = $(TARGET)/inferno INFERNO_PKGDIR = $(TARGET)/inferno
INFERNO_BUILDDIR = $(BUILD)/inferno INFERNO_BUILDDIR = $(BUILD)/inferno
INFERNO_ERIS_CACHE = $(CACHE)/eris.git inferno-source:
INFERNO_ERIS_URL = http://woozle.org/~neale/projects/eris
$(INFERNO_ERIS_CACHE): inferno-build:
git clone --bare $(INFERNO_ERIS_URL) $@
inferno-source: $(INFERNO_BUILDDIR) inferno-install: eris
$(INFERNO_BUILDDIR): $(INFERNO_ERIS_CACHE)
git clone $< $@
inferno-build: $(INFERNO_BUILDDIR)/build
$(INFERNO_BUILDDIR)/build: $(INFERNO_BUILDDIR)
$(MAKE) -C $(INFERNO_BUILDDIR)
inferno-install: $(INFERNO_BUILDDIR)/build
mkdir -p $(INFERNO_PKGDIR)/bin mkdir -p $(INFERNO_PKGDIR)/bin
cp $(INFERNO_BUILDDIR)/eris $(INFERNO_PKGDIR)/bin/ cp $(ERIS_BIN) $(INFERNO_PKGDIR)/bin/
$(call COPYTREE, packages/inferno/service, $(INFERNO_PKGDIR)/service) $(call COPYTREE, packages/inferno/service, $(INFERNO_PKGDIR)/service)

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
/opt/00admin/sbin/fire-ip del /opt/00admin/bin/fire-ip del

View File

@ -2,7 +2,7 @@
exec 2>&1 exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip add) IP=$(/opt/00admin/bin/fire-ip add)
adduser -S -H -u 65534 nobody adduser -S -H -u 65534 nobody
adduser -S -H irc adduser -S -H irc

View File

@ -1,31 +1,16 @@
MCP_PKGDIR = $(TARGET)/mcp MCP_PKGDIR = $(TARGET)/mcp
MCP_BUILDDIR = $(BUILD)/mcp MCP_BUILDDIR = $(BUILD)/mcp
##
## XXX: clean up eris like router.mk
##
ERIS_CACHE = $(CACHE)/eris.git
ERIS_BUILDDIR = $(MCP_BUILDDIR)/eris
ERIS_URL = http://woozle.org/~neale/projects/eris
$(ERIS_CACHE):
git clone --bare $(ERIS_URL) $@
mcp-source: $(MCP_BUILDDIR)/source mcp-source: $(MCP_BUILDDIR)/source
$(MCP_BUILDDIR)/source: $(ERIS_CACHE) $(MCP_BUILDDIR)/source:
mkdir -p $(@D) mkdir -p $(@D)
git clone $(ERIS_CACHE) $(@D)/eris
touch $@ touch $@
mcp-build: $(MCP_BUILDDIR)/build mcp-build: $(MCP_BUILDDIR)/build
$(MCP_BUILDDIR)/build: $(MCP_BUILDDIR)/source $(MCP_BUILDDIR)/build: $(MCP_BUILDDIR)/source
$(MAKE) -C packages/mcp/src build $(MAKE) -C packages/mcp/src build
$(MAKE) -C $(MCP_BUILDDIR)/eris
mcp-install: $(MCP_BUILDDIR)/build eris
mcp-install: $(MCP_BUILDDIR)/build
mkdir -p $(MCP_PKGDIR) mkdir -p $(MCP_PKGDIR)
$(call COPYTREE, packages/mcp/bin, $(MCP_PKGDIR)/bin) $(call COPYTREE, packages/mcp/bin, $(MCP_PKGDIR)/bin)
@ -33,7 +18,7 @@ mcp-install: $(MCP_BUILDDIR)/build
cp packages/mcp/src/puzzles.cgi $(MCP_PKGDIR)/bin/ cp packages/mcp/src/puzzles.cgi $(MCP_PKGDIR)/bin/
cp packages/mcp/src/tea $(MCP_PKGDIR)/bin/ cp packages/mcp/src/tea $(MCP_PKGDIR)/bin/
cp $(MCP_BUILDDIR)/eris/eris $(MCP_PKGDIR)/bin/ cp $(ERIS_BIN) $(MCP_PKGDIR)/bin/
$(call COPYTREE, packages/mcp/service, $(MCP_PKGDIR)/service) $(call COPYTREE, packages/mcp/service, $(MCP_PKGDIR)/service)

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
/opt/00admin/sbin/fire-ip del /opt/00admin/bin/fire-ip del

View File

@ -2,7 +2,7 @@
exec 2>&1 exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip add) IP=$(/opt/00admin/bin/fire-ip add)
hostname mcp hostname mcp

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
/opt/00admin/sbin/fire-ip del /opt/00admin/bin/fire-ip del

View File

@ -2,6 +2,6 @@
exec 2>&1 exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip add) IP=$(/opt/00admin/bin/fire-ip add)
exec setuidgid ctf /opt/multicaster/bin/multicaster ff15::62c 1580 </opt/multicaster/tokens.txt exec setuidgid ctf /opt/multicaster/bin/multicaster ff15::62c 1580 </opt/multicaster/tokens.txt

View File

@ -2,7 +2,7 @@
exec 2>&1 exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip) IP=$(/opt/00admin/bin/fire-ip)
sv s octopus >/dev/null || exit 1 sv s octopus >/dev/null || exit 1
exec tcpsvd ${IP%/*} 8888 ./octopus-redirect exec tcpsvd ${IP%/*} 8888 ./octopus-redirect

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
/opt/00admin/sbin/fire-ip del /opt/00admin/bin/fire-ip del

View File

@ -2,7 +2,7 @@
exec 2>&1 exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip add) IP=$(/opt/00admin/bin/fire-ip add)
grep -q ipv4 /proc/cmdline && IP=::ffff:$IP grep -q ipv4 /proc/cmdline && IP=::ffff:$IP

View File

@ -1 +1,4 @@
modem: all: modem tea
clean:
rm -f modem tea

BIN
packages/p2/www/p2inv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -5,20 +5,6 @@ define COPYTREE
(cd $(1) && find . -not -name "*~" | cpio -o) | (cd $(2) && cpio -i) (cd $(1) && find . -not -name "*~" | cpio -o) | (cd $(2) && cpio -i)
endef endef
define STANDARD_PUZZLE
t=$(strip $1)
$t-install: $(TARGET)/$t
$(TARGET)/$t: packages/$t
mkdir -p $(TARGET)/$t
./mkpuzzles packages/$t $(TARGET)/$t
$t-clean: $t-stdclean
$t-stdclean:
rm -rf $(TARGET)/$t $(BIN)/$t.pkg
PACKAGES += $t
endef
include packages/*/*.mk include packages/*/*.mk
# Things configure likes to see # Things configure likes to see

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
/opt/00admin/sbin/fire-ip del /opt/00admin/bin/fire-ip del

View File

@ -2,7 +2,7 @@
exec 2>&1 exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip add) IP=$(/opt/00admin/bin/fire-ip add)
ip addr add $IP dev eth0 || true ip addr add $IP dev eth0 || true
exec tcpsvd -u nobody ${IP%/*} 1013 /opt/playfair/bin/playfair exec tcpsvd -u nobody ${IP%/*} 1013 /opt/playfair/bin/playfair

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
/opt/00admin/sbin/fire-ip del /opt/00admin/bin/fire-ip del

View File

@ -2,7 +2,7 @@
exec 2>&1 exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip add) IP=$(/opt/00admin/bin/fire-ip add)
# So I say to him, "Alex, what's a good high port number for a CTF category?" # So I say to him, "Alex, what's a good high port number for a CTF category?"
# And he says, "6" # And he says, "6"

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
/opt/00admin/sbin/fire-ip del /opt/00admin/bin/fire-ip del

View File

@ -2,7 +2,7 @@
exec 2>&1 exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip add) IP=$(/opt/00admin/bin/fire-ip add)
exec tcpsvd -u nobody ${IP%/*} 1013 ./go exec tcpsvd -u nobody ${IP%/*} 1013 ./go

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
/opt/00admin/sbin/fire-ip del /opt/00admin/bin/fire-ip del

View File

@ -2,7 +2,7 @@
exec 2>&1 exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip add) IP=$(/opt/00admin/bin/fire-ip add)
dir=/var/lib/ctf/rlyeh dir=/var/lib/ctf/rlyeh
install -o nobody -d $dir install -o nobody -d $dir