GNUmakefile.in 4.96 KB
Newer Older
Leigh B. Stoller's avatar
Leigh B. Stoller committed
1
2
3
4
5
6
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#

7
8
9
10
11
12
13
14
15
16
#
# XXX ONLY RUN THIS INSTALL ON A LINUX TESTBED NODE!
#
# Trivial. These things just need to be installed into the right place
# on a testbed node before cutting an image.
#
#
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ../..
17
SUBDIR		= tmcd/linux
18
19
20

include $(OBJDIR)/Makeconf

21
all:	pump.conf supfile
22
23
24

include $(TESTBED_SRCDIR)/GNUmakerules

25
DESTDIR		=
26
27
28
29
30
SYSETCDIR	= $(DESTDIR)/etc
ETCDIR		= $(DESTDIR)$(CLIENT_ETCDIR)
BINDIR		= $(DESTDIR)$(CLIENT_BINDIR)
VARDIR		= $(DESTDIR)$(CLIENT_VARDIR)
RCDIR		= $(SYSETCDIR)/rc.d
31
INSTALL		= /usr/bin/install -c 
32
COMMON		= $(SRCDIR)/../common
33

34
35
36
install:	common-install etc-install \
			sup-install script-install bin-install
	@echo "Remember to install the PEM files if necessary"
37
38

dir-install:
39
40
41
42
43
44
45
46
47
48
49
50
51
	$(INSTALL) -m 755 -o root -g wheel -d $(ETCDIR)
	$(INSTALL) -m 755 -o root -g wheel -d $(BINDIR)
	$(INSTALL) -m 755 -o root -g wheel -d $(RCDIR)
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/db
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/jails
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/logs
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/sup
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/boot
	-rm -rf $(DESTDIR)/etc/testbed
	ln -s emulab $(DESTDIR)/etc/testbed
	-rm -rf $(DESTDIR)/usr/local/etc/testbed
	ln -s emulab $(DESTDIR)/usr/local/etc/testbed
52

53
54
55
56
57
common-install:	dir-install
	(cd ../common; $(MAKE) local-install)

sup-install:	dir-install
	$(INSTALL) -m 755 ./supfile $(ETCDIR)/supfile
58
59
	$(INSTALL) -m 750 -o root -g wheel -d $(DESTDIR)/root/.cvsup
	$(INSTALL) -m 600 $(SRCDIR)/cvsup.auth $(DESTDIR)/root/.cvsup/auth
60
61

bin-install:	dir-install
62
63
	$(INSTALL) -m 755 ../tmcc-nossl $(BINDIR)/tmcc
	$(INSTALL) -m 755 ../findif $(BINDIR)/findif
64

65
66
67
68
69
70
71
72
73
74
etc-install:	dir-install sysetc-install
	$(INSTALL) -m 644 $(SRCDIR)/group $(ETCDIR)/group
	$(INSTALL) -m 644 $(SRCDIR)/passwd $(ETCDIR)/passwd
	$(INSTALL) -m 600 $(SRCDIR)/shadow $(ETCDIR)/shadow
	$(INSTALL) -m 600 $(SRCDIR)/gshadow $(ETCDIR)/gshadow
	$(INSTALL) -m 644 $(SRCDIR)/hosts $(ETCDIR)/hosts

sysetc-install:	dir-install
	$(INSTALL) -m 644 ./pump.conf $(SYSETCDIR)/pump.conf
	$(INSTALL) -m 644 $(SRCDIR)/modules.conf $(SYSETCDIR)/modules.conf
75
	$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth0 \
76
			$(SYSETCDIR)/sysconfig/network-scripts/ifcfg-eth0
77
	$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth1 \
78
			$(SYSETCDIR)/sysconfig/network-scripts/ifcfg-eth1
79
	$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth2 \
80
			$(SYSETCDIR)/sysconfig/network-scripts/ifcfg-eth2
81
	$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth3 \
82
			$(SYSETCDIR)/sysconfig/network-scripts/ifcfg-eth3
83
	$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth4 \
84
85
86
87
88
89
			$(SYSETCDIR)/sysconfig/network-scripts/ifcfg-eth4
	$(INSTALL) -m 755 $(SRCDIR)/ntpd.sh $(RCDIR)/init.d/ntpd
	$(INSTALL) -m 755 $(SRCDIR)/testbed $(RCDIR)/init.d/testbed
	-ln -s $(RCDIR)/init.d/testbed $(RCDIR)/rc3.d/S96testbed
	-ln -s $(RCDIR)/init.d/testbed $(RCDIR)/rc1.d/K12testbed
	-ln -s $(RCDIR)/init.d/testbed $(RCDIR)/rc6.d/K12testbed
90
91
92
93
94
95
96
97
98
	$(INSTALL) -m 755 -o root -g wheel -d $(SYSETCDIR)/cron.pend
	if [ -e $(SYSETCDIR)/cron.daily/slocate.cron ]; then \
		mv -f $(SYSETCDIR)/cron.daily/slocate.cron \
				$(SYSETCDIR)/cron.pend; \
	fi
	if [ -e $(SYSETCDIR)/cron.daily/makewhatis.cron ]; then \
		mv -f $(SYSETCDIR)/cron.daily/makewhatis.cron \
				$(SYSETCDIR)/cron.pend; \
	fi
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

sysetc-remove:
	-rm -f $(RCDIR)/*/S95anacron $(RCDIR)/*/K05anacron 

script-install:	dir-install
	$(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm
	$(INSTALL) -m 755 $(SRCDIR)/rc.ipod $(BINDIR)/rc.ipod
	$(INSTALL) -m 755 $(SRCDIR)/prepare $(BINDIR)/prepare
	$(INSTALL) -m 755 $(SRCDIR)/sethostname $(BINDIR)/sethostname
	$(INSTALL) -m 755 $(SRCDIR)/rc.healthd $(BINDIR)/rc.healthd
	$(INSTALL) -m 755 $(SRCDIR)/chipset.awk $(BINDIR)/chipset.awk
	$(INSTALL) -m 755 $(SRCDIR)/cpuspeed.awk $(BINDIR)/cpuspeed.awk
	$(INSTALL) -m 755 $(SRCDIR)/nodetype $(BINDIR)/nodetype
	$(INSTALL) -m 755 $(SRCDIR)/control_interface \
			$(BINDIR)/control_interface
	$(INSTALL) -m 644 $(SRCDIR)/gated_eth0.conf $(BINDIR)/gated_eth0.conf
	$(INSTALL) -m 644 $(SRCDIR)/gated_eth2.conf $(BINDIR)/gated_eth2.conf
	$(INSTALL) -m 644 $(SRCDIR)/gated_eth4.conf $(BINDIR)/gated_eth4.conf
117
118
119

sfs-install:
	$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/etc/sfs
120
	$(INSTALL) -m 755 $(SRCDIR)/sfs.sh $(RC_DIR)/init.d/sfs
121
	-ln -s $(RC_DIR)/init.d/nfs $(RC_DIR)/rc3.d/S20nfs
122
123
124
	-ln -s $(RC_DIR)/init.d/sfs $(RC_DIR)/rc3.d/S50sfs
	-ln -s $(RC_DIR)/init.d/sfs $(RC_DIR)/rc3.d/K19sfs
	-ln -s $(RC_DIR)/init.d/sfs $(RC_DIR)/rc6.d/K19sfs
125
126
127
128
129
130
131
	$(INSTALL) -m 644 $(SRCDIR)/exports $(ETCDIR)/exports
	$(INSTALL) -m 644 $(SRCDIR)/sfsrwsd_config $(ETCDIR)/sfs/sfsrwsd_config
	$(INSTALL) -m 644 $(SRCDIR)/sfssd_config $(ETCDIR)/sfs/sfssd_config
	$(INSTALL) -m 755 -o sfs -g sfs -d $(DESTDIR)/var/sfs
	$(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/root
	$(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/var
	$(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/usr