source: bootscripts/Makefile@ 5497725

s6-init
Last change on this file since 5497725 was 5497725, checked in by Thomas Trepl (Moody) <thomas@…>, 4 months ago

Updates...

  • Property mode set to 100644
File size: 6.1 KB
Line 
1ETCDIR=${DESTDIR}/etc
2LIBDIR=${DESTDIR}/lib
3SERVICEDIR=${LIBDIR}/services
4MAN8=${DESTDIR}/usr/share/man/man8
5SBIN=${DESTDIR}/sbin
6MODE=754
7DIRMODE=755
8CONFMODE=644
9
10all: links
11
12install: all
13
14install-s6: s6-files
15
16s6-dirs:
17 install -d -m ${DIRMODE} ${ETCDIR}/s6-rc/services
18
19s6-files: s6-dirs
20 cp -a s6/services/mount-virtfs ${ETCDIR}/s6-rc/services/
21 cp -a s6/services/mount-procfs ${ETCDIR}/s6-rc/services/
22 cp -a s6/services/mount-sysfs ${ETCDIR}/s6-rc/services/
23 cp -a s6/services/hostname ${ETCDIR}/s6-rc/services/
24 cp -a s6/services/default ${ETCDIR}/s6-rc/services/
25
26create-dirs:
27 install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc0.d
28 install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc1.d
29 install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc2.d
30 install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc3.d
31 install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc4.d
32 install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc5.d
33 install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc6.d
34 install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rcS.d
35 install -d -m ${DIRMODE} ${ETCDIR}/rc.d/init.d
36 install -d -m ${DIRMODE} ${ETCDIR}/sysconfig
37 install -d -m ${DIRMODE} ${LIBDIR}
38 install -d -m ${DIRMODE} ${SERVICEDIR}
39 install -d -m ${DIRMODE} ${MAN8}
40 install -d -m ${DIRMODE} ${SBIN}
41 ln -sfn services ${LIBDIR}/lsb
42 ln -sfn rc.d/init.d ${ETCDIR}/init.d
43
44files: create-dirs
45 install -m ${MODE} lfs/init.d/checkfs ${ETCDIR}/rc.d/init.d/
46 install -m ${MODE} lfs/init.d/cleanfs ${ETCDIR}/rc.d/init.d/
47 install -m ${MODE} lfs/init.d/halt ${ETCDIR}/rc.d/init.d/
48 install -m ${MODE} lfs/init.d/console ${ETCDIR}/rc.d/init.d/
49 install -m ${MODE} lfs/init.d/localnet ${ETCDIR}/rc.d/init.d/
50 install -m ${MODE} lfs/init.d/modules ${ETCDIR}/rc.d/init.d/
51 install -m ${MODE} lfs/init.d/mountfs ${ETCDIR}/rc.d/init.d/
52 install -m ${MODE} lfs/init.d/mountvirtfs ${ETCDIR}/rc.d/init.d/
53 install -m ${MODE} lfs/init.d/network ${ETCDIR}/rc.d/init.d/
54 install -m ${MODE} lfs/init.d/rc ${ETCDIR}/rc.d/init.d/
55 install -m ${MODE} lfs/init.d/reboot ${ETCDIR}/rc.d/init.d/
56 install -m ${MODE} lfs/init.d/sendsignals ${ETCDIR}/rc.d/init.d/
57 install -m ${MODE} lfs/init.d/setclock ${ETCDIR}/rc.d/init.d/
58 install -m ${MODE} lfs/init.d/swap ${ETCDIR}/rc.d/init.d/
59 install -m ${MODE} lfs/init.d/sysctl ${ETCDIR}/rc.d/init.d/
60 install -m ${MODE} lfs/init.d/sysklogd ${ETCDIR}/rc.d/init.d/
61 install -m ${MODE} lfs/init.d/template ${ETCDIR}/rc.d/init.d/
62 install -m ${MODE} lfs/init.d/udev ${ETCDIR}/rc.d/init.d/
63 install -m ${MODE} lfs/init.d/udev_retry ${ETCDIR}/rc.d/init.d/
64 install -m ${MODE} lfs/sbin/ifup ${SBIN}
65 install -m ${MODE} lfs/sbin/ifdown ${SBIN}
66 install -m ${CONFMODE} lfs/sbin/ifup.8 ${MAN8}
67 ln -sf ifup.8 ${MAN8}/ifdown.8
68 install -m ${MODE} lfs/lib/services/ipv4-static-route ${SERVICEDIR}
69 install -m ${MODE} lfs/lib/services/ipv4-static ${SERVICEDIR}
70 install -m ${CONFMODE} lfs/lib/services/init-functions ${SERVICEDIR}
71
72 if [ ! -f ${ETCDIR}/sysconfig/createfiles ]; then \
73 install -m ${CONFMODE} lfs/sysconfig/createfiles ${ETCDIR}/sysconfig/ ;\
74 fi
75 if [ ! -f ${ETCDIR}/sysconfig/modules ]; then \
76 install -m ${CONFMODE} lfs/sysconfig/modules ${ETCDIR}/sysconfig/ ;\
77 fi
78 if [ ! -f ${ETCDIR}/sysconfig/udev_retry ]; then \
79 install -m ${CONFMODE} lfs/sysconfig/udev_retry ${ETCDIR}/sysconfig/ ;\
80 fi
81 if [ ! -f ${ETCDIR}/sysconfig/rc.site ]; then \
82 install -m ${CONFMODE} lfs/sysconfig/rc.site ${ETCDIR}/sysconfig/ ;\
83 fi
84
85links: rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6
86
87rcS: files
88 ln -sf ../init.d/mountvirtfs ${ETCDIR}/rc.d/rcS.d/S00mountvirtfs
89 ln -sf ../init.d/modules ${ETCDIR}/rc.d/rcS.d/S05modules
90 ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rcS.d/S08localnet
91 ln -sf ../init.d/udev ${ETCDIR}/rc.d/rcS.d/S10udev
92 ln -sf ../init.d/swap ${ETCDIR}/rc.d/rcS.d/S20swap
93 ln -sf ../init.d/checkfs ${ETCDIR}/rc.d/rcS.d/S30checkfs
94 ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rcS.d/S40mountfs
95 ln -sf ../init.d/cleanfs ${ETCDIR}/rc.d/rcS.d/S45cleanfs
96 ln -sf ../init.d/udev_retry ${ETCDIR}/rc.d/rcS.d/S50udev_retry
97 ln -sf ../init.d/console ${ETCDIR}/rc.d/rcS.d/S70console
98 ln -sf ../init.d/sysctl ${ETCDIR}/rc.d/rcS.d/S90sysctl
99
100rc0: files
101 ln -sf ../init.d/network ${ETCDIR}/rc.d/rc0.d/K80network
102 ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc0.d/K90sysklogd
103 ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc0.d/K92sendsignals
104 ln -sf ../init.d/swap ${ETCDIR}/rc.d/rc0.d/K94swap
105 ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rc0.d/K96mountfs
106 ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rc0.d/K98localnet
107 ln -sf ../init.d/halt ${ETCDIR}/rc.d/rc0.d/S99halt
108
109rc1: files
110 ln -sf ../init.d/network ${ETCDIR}/rc.d/rc1.d/K80network
111 ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc1.d/K90sysklogd
112
113rc2: files
114 ln -sf ../init.d/network ${ETCDIR}/rc.d/rc2.d/S10network
115 ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc2.d/S20sysklogd
116
117rc3: files
118 ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc3.d/S10sysklogd
119 ln -sf ../init.d/network ${ETCDIR}/rc.d/rc3.d/S20network
120
121rc4: files
122 ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc4.d/S10sysklogd
123 ln -sf ../init.d/network ${ETCDIR}/rc.d/rc4.d/S20network
124
125rc5: files
126 ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc5.d/S10sysklogd
127 ln -sf ../init.d/network ${ETCDIR}/rc.d/rc5.d/S20network
128
129rc6: files
130 ln -sf ../init.d/network ${ETCDIR}/rc.d/rc6.d/K80network
131 ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc6.d/K90sysklogd
132 ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc6.d/K92sendsignals
133 ln -sf ../init.d/swap ${ETCDIR}/rc.d/rc6.d/K94swap
134 ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rc6.d/K96mountfs
135 ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rc6.d/K98localnet
136 ln -sf ../init.d/reboot ${ETCDIR}/rc.d/rc6.d/S99reboot
137
138uninstall:
139 rm -rf ${DESTDIR}/lib/services ${DESTDIR}/lib/lsb ${ETCDIR}/rc.d ${ETCDIR}/init.d \
140 ${SBIN}/ifup ${SBIN}/ifdown ${MAN8}/ifup.8 ${MAN8}/ifdown.8 \
141 ${ETCDIR}/sysconfig/rc
142
143.PHONY: all create-dirs install files links rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6 uninstall install-s6
144
Note: See TracBrowser for help on using the repository browser.