GNUmakefile.in 3.09 KB
Newer Older
1
2
#
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2010 University of Utah and the Flux Group.
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# All rights reserved.
#

#
# 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		= ../..
SUBDIR		= tmcd/fedora

include $(OBJDIR)/Makeconf

SCRIPTS		= 

MYINSTALL	= $(SRCDIR)/myinstall

#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
# 
all:	supfile ifcfgs

include $(TESTBED_SRCDIR)/GNUmakerules

SYSETCDIR	= $(DESTDIR)/etc
ETCDIR		= $(DESTDIR)$(CLIENT_ETCDIR)
BINDIR		= $(DESTDIR)$(CLIENT_BINDIR)
VARDIR		= $(DESTDIR)$(CLIENT_VARDIR)
RCDIR		= $(SYSETCDIR)/rc.d
INSTALL		= /usr/bin/install -c 
COMMON		= $(SRCDIR)/../common

41
install client-install:	baselinux-client-install common-install etc-install \
42
43
44
			sup-install script-install bin-install
	@echo "Remember to install the PEM files if necessary"

45
46
47
48
mfs-install: client-install baselinux-mfs-install

frisbee-mfs-install: baselinux-frisbee-mfs-install

49
50
simple-install:	common-install script-install bin-install

51
52
53
54
openvz-install:	baselinux-common-install common-install \
                baselinux-script-install script-install \
		baselinux-openvz-install etc-install

55
dir-install:
Mike Hibler's avatar
Mike Hibler committed
56
	$(INSTALL) -m 755 -o root -g root -d $(SYSETCDIR)/init.d
57

58
59
baselinux-%: dir-install
	(cd ../linux; $(MAKE) DESTDIR=$(DESTDIR) $(subst baselinux-,,$@))
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

common-install:	dir-install
	@echo "no fedora-specific common files"

sup-install:	dir-install supfile
	$(INSTALL) -m 755 ./supfile $(ETCDIR)/supfile
	@echo "fedora-specific sup-install done"

bin-install:	dir-install
	@echo "no fedora-specific bin files"

etc-install:	dir-install sysetc-remove sysetc-install
	@echo "fedora-specific etc-install done"

sysetc-install:	ifcfgs dir-install
	$(INSTALL) -m 644 $(SRCDIR)/ntp.conf $(SYSETCDIR)/ntp.conf
Mike Hibler's avatar
Mike Hibler committed
76
	$(INSTALL) -m 755 $(SRCDIR)/ntpd $(SYSETCDIR)/init.d/ntpd
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
	$(INSTALL) -m 644 $(SRCDIR)/ifcfg-eth99 $(SYSETCDIR)/sysconfig/network-scripts
	$(INSTALL) -m 644 ifcfg-eth[0-9]* $(SYSETCDIR)/sysconfig/network-scripts

sysetc-remove:
	rm -rf $(SYSETCDIR)/modules.conf $(SYSETCDIR)/ntp.conf $(SYSETCDIR)/cron.pend

# stuff we don't really need to do all the time and may not even be correct
# or sufficient for all FCs
sysetc-onceonly-install:
	@$(MYINSTALL) $(SRCDIR)/emulab-ld.so.conf $(SYSETCDIR)/ld.so.conf.d/emulab.conf
	@$(MYINSTALL) $(SRCDIR)/inittab $(SYSETCDIR)/inittab
	@$(MYINSTALL) $(SRCDIR)/login.defs $(SYSETCDIR)/login.defs
	@$(MYINSTALL) $(SRCDIR)/modprobe.conf $(SYSETCDIR)/modprobe.conf
	@$(MYINSTALL) -m 600 $(SRCDIR)/securetty $(SYSETCDIR)/securetty
	@$(MYINSTALL) -m 440 $(SRCDIR)/sudoers $(SYSETCDIR)/sudoers
	@$(MYINSTALL) $(SRCDIR)/syslog.conf $(SYSETCDIR)/syslog.conf

94
script-install:	dir-install $(SCRIPTS)
95
	$(INSTALL) -m 755 $(SRCDIR)/delaysetup $(BINDIR)/delaysetup
96
97
98
99
100
101
102
103
104
105

sfs-install:
	@echo "no fedora-specific sfs files"

# create ifcfg-eth? files
ifcfgs:	$(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template
	$(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template

clean:
	rm -f ifcfg-eth? supfile