Skip to content

Commit

Permalink
Topo boot scripts cleanup
Browse files Browse the repository at this point in the history
- there is no more generic boot scripts
- the boot scripts are specialized for each system (FreeBSD, Debian)
- the boot scripts are now located in the pkg subdirectories
- phase 1: freebsd topo* boot scripts

This commit is related to issue #34 and issue #32.
  • Loading branch information
Charlie Root committed Apr 18, 2012
1 parent 65d629e commit b095179
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 133 deletions.
2 changes: 2 additions & 0 deletions pkg/freebsd/netmagis-common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ RUN_DEPENDS+= pdflatex:${PORTSDIR}/print/teTeX-base \
.endif

.if ${PKGNAMESUFFIX} == "-topo"
USE_RC_SUBR= topographd toposendd
SUB_LIST= TCLSH=${TCLSH}
RUN_DEPENDS+= rancid-run:${PORTSDIR}/net-mgmt/rancid \
fping:${PORTSDIR}/net/fping
.endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@

name=topographd
rcvar=topographd_enable
command_interpreter=%TCLSH%
command_interpreter=%%TCLSH%%

load_rc_config $name

: ${topographd_enable:=NO}
: ${topographd_flags:=""}
: ${topographd_user:="rancid"}

command="%NMLIBDIR%/topo/topographd"
command="%%PREFIX%%/sbin/topographd"

run_rc_command "$1"
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@

name=toposendd
rcvar=toposendd_enable
command_interpreter=%TCLSH%
command_interpreter=%%TCLSH%%

load_rc_config $name

: ${toposendd_enable:=NO}
: ${toposendd_flags:=""}
: ${toposendd_user:="rancid"}

command="%NMLIBDIR%/topo/toposendd"
command="%%PREFIX%%/sbin/toposendd"

run_rc_command "$1"
10 changes: 8 additions & 2 deletions pkg/freebsd/netmagis-topo/pkg-plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,18 @@ lib/netmagis/topo/parse-server.tcl
lib/netmagis/topo/sendmail
lib/netmagis/topo/ssidsensors
lib/netmagis/topo/start-rancid
lib/netmagis/topo/topographd
lib/netmagis/topo/toposendd
sbin/topographd
sbin/toposendd
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/eqvirt/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/eqvirt/rtr.eq
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/eqvirt/sw1.eq
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/eqvirt/sw2.eq
@dirrmtry var/netmagis/eqvirt
@dirrmtry var/netmagis/eqgen
@dirrmtry var/netmagis
@dirrmtry var
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/eqvirt
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
@dirrm lib/netmagis/topo
@dirrm lib/netmagis
@exec mkdir -p %D/var/netmagis/eqvirt
Expand Down
1 change: 0 additions & 1 deletion topo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ build:
install: build
@echo ">>> Making install in `pwd`"
cd src ; make $(DIRS) install
cd rc ; make $(DIRS) install
cd eqvirt ; make $(DIRS) install
mkdir -p $(DESTDIR)$(NMVARDIR)/eqvirt
mkdir -p $(DESTDIR)$(NMVARDIR)/eqgen
Expand Down
14 changes: 0 additions & 14 deletions topo/rc/Makefile

This file was deleted.

16 changes: 0 additions & 16 deletions topo/rc/freebsd/Makefile

This file was deleted.

16 changes: 0 additions & 16 deletions topo/rc/generic/Makefile

This file was deleted.

39 changes: 0 additions & 39 deletions topo/rc/generic/topographd.sh

This file was deleted.

39 changes: 0 additions & 39 deletions topo/rc/generic/toposendd.sh

This file was deleted.

8 changes: 6 additions & 2 deletions topo/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ SCRIPTS = \
list-rancid \
list-vlans \
ssidsensors \
topographd \
toposendd \
start-rancid \
sendmail

DAEMONS = \
topographd \
toposendd

LIBS = \
parse-hp.tcl \
parse-cisco.tcl \
Expand All @@ -53,6 +55,8 @@ install: $(PROGS) $(SCRIPTS)
install -m 0755 $(PROGS) $(DESTDIR)$(NMLIBDIR)/topo
$(NINSTALL) -m 0755 $(SUBST) $(SCRIPTS) $(DESTDIR)$(NMLIBDIR)/topo
$(NINSTALL) -m 0644 $(SUBST) $(LIBS) $(DESTDIR)$(NMLIBDIR)/topo
mkdir -p $(DESTDIR)$(SBINDIR)
$(NINSTALL) -m 0755 $(SUBST) $(DAEMONS) $(DESTDIR)$(SBINDIR)

clean:
rm -f *.o $(PROGS) *.core

0 comments on commit b095179

Please sign in to comment.