GNUmakefile.in 4.41 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
21
22
23
24

include $(OBJDIR)/Makeconf

all:

include $(TESTBED_SRCDIR)/GNUmakerules

25
26
27
28
DESTDIR		=
ETCDIR		= $(DESTDIR)/etc
RC_DIR		= $(ETCDIR)/rc.d
INSTALL_DIR	= $(RC_DIR)/testbed
29
30
31
INSTALL_FILES	= group gshadow passwd rc.testbed setup shadow
INSTALL		= /usr/bin/install -c 

32
33
34
install:	misc-install script-install bin-install

dir-install:
35
	$(INSTALL) -m 755 -o root -g wheel -d $(INSTALL_DIR)
36
37
38
39
	$(INSTALL) -m 755 -o root -g wheel -d /var/emulab
	$(INSTALL) -m 755 -o root -g wheel -d /var/emulab/db
	$(INSTALL) -m 755 -o root -g wheel -d /var/emulab/jails
	$(INSTALL) -m 755 -o root -g wheel -d /var/emulab/logs
40
41
42
43
	-rm -f /etc/testbed
	-ln -s $(INSTALL_DIR) /etc/testbed

misc-install:	dir-install
44
	$(INSTALL) -m 755 -o root -g wheel -d $(INSTALL_DIR)/sup
45
	$(INSTALL) -m 755 $(SRCDIR)/supfile $(INSTALL_DIR)/supfile
46
47
	$(INSTALL) -m 750 -o root -g wheel -d $(DESTDIR)/root/.cvsup
	$(INSTALL) -m 600 $(SRCDIR)/cvsup.auth $(DESTDIR)/root/.cvsup/auth
48
49
50
51
52
53

bin-install:	dir-install
	$(INSTALL) -m 755 ../tmcc $(INSTALL_DIR)/tmcc
	$(INSTALL) -m 755 ../findif $(INSTALL_DIR)/findif

script-install:	dir-install
54
55
56
57
	$(INSTALL) -m 644 $(SRCDIR)/group $(INSTALL_DIR)/group
	$(INSTALL) -m 644 $(SRCDIR)/passwd $(INSTALL_DIR)/passwd
	$(INSTALL) -m 600 $(SRCDIR)/shadow $(INSTALL_DIR)/shadow
	$(INSTALL) -m 600 $(SRCDIR)/gshadow $(INSTALL_DIR)/gshadow
58
59
60
	$(INSTALL) -m 755 $(SRCDIR)/../libsetup.pm $(INSTALL_DIR)/libsetup.pm
	$(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm \
			$(INSTALL_DIR)/liblocsetup.pm
61
	$(INSTALL) -m 755 $(SRCDIR)/rc.testbed $(INSTALL_DIR)/rc.testbed
62
	$(INSTALL) -m 755 $(SRCDIR)/rc.setup $(INSTALL_DIR)/rc.setup
63
	$(INSTALL) -m 755 $(SRCDIR)/rc.delta $(INSTALL_DIR)/rc.delta
64
	$(INSTALL) -m 755 $(SRCDIR)/runstartup $(INSTALL_DIR)/runstartup
65
	$(INSTALL) -m 755 $(SRCDIR)/prepare $(INSTALL_DIR)/prepare
66
	$(INSTALL) -m 755 $(SRCDIR)/sendevent $(INSTALL_DIR)/sendevent
67
	$(INSTALL) -m 755 $(SRCDIR)/setup $(INSTALL_DIR)/setup
68
	$(INSTALL) -m 755 $(SRCDIR)/update $(INSTALL_DIR)/update
69
	$(INSTALL) -m 755 $(SRCDIR)/sethostname $(INSTALL_DIR)/sethostname
70
	$(INSTALL) -m 644 $(SRCDIR)/hosts $(INSTALL_DIR)/hosts
71
	$(INSTALL) -m 644 $(SRCDIR)/pump.conf $(ETCDIR)/pump.conf
72
	$(INSTALL) -m 755 $(SRCDIR)/chipset.awk $(INSTALL_DIR)/chipset.awk
73
74
	$(INSTALL) -m 755 $(SRCDIR)/cpuspeed.awk $(INSTALL_DIR)/cpuspeed.awk
	$(INSTALL) -m 755 $(SRCDIR)/nodetype $(INSTALL_DIR)/nodetype
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
	$(INSTALL) -m 755 $(SRCDIR)/control_interface \
			$(INSTALL_DIR)/control_interface
	$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth0 \
			$(ETCDIR)/sysconfig/network-scripts/ifcfg-eth0
	$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth1 \
			$(ETCDIR)/sysconfig/network-scripts/ifcfg-eth1
	$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth2 \
			$(ETCDIR)/sysconfig/network-scripts/ifcfg-eth2
	$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth3 \
			$(ETCDIR)/sysconfig/network-scripts/ifcfg-eth3
	$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth4 \
			$(ETCDIR)/sysconfig/network-scripts/ifcfg-eth4
	$(INSTALL) -m 644 $(SRCDIR)/gated_eth0.conf \
			$(INSTALL_DIR)/gated_eth0.conf
	$(INSTALL) -m 644 $(SRCDIR)/gated_eth2.conf \
			$(INSTALL_DIR)/gated_eth2.conf
	$(INSTALL) -m 644 $(SRCDIR)/gated_eth4.conf \
			$(INSTALL_DIR)/gated_eth4.conf
93
94
95
96
	$(INSTALL) -m 755 $(SRCDIR)/testbed $(RC_DIR)/init.d/testbed
	-ln -s $(RC_DIR)/init.d/testbed $(RC_DIR)/rc3.d/S12testbed
	-ln -s $(RC_DIR)/init.d/testbed $(RC_DIR)/rc1.d/K12testbed
	-ln -s $(RC_DIR)/init.d/testbed $(RC_DIR)/rc6.d/K12testbed
97
98
99

sfs-install:
	$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/etc/sfs
100
	$(INSTALL) -m 755 $(SRCDIR)/sfs.sh $(RC_DIR)/init.d/sfs
101
	-ln -s $(RC_DIR)/init.d/nfs $(RC_DIR)/rc3.d/S20nfs
102
103
104
	-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
105
106
107
108
109
110
111
	$(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