source: bootscripts-standard/boot-scripts/Makefile@ 8b29156

Last change on this file since 8b29156 was 77aff82, checked in by William Harrington <kb0iic@…>, 11 years ago

Add directory housing the scripts for the boot-method currently used in the systemd book.

  • Property mode set to 100644
File size: 5.1 KB
Line 
1VERSION := 3.0-pre11
2
3ETCDIR := /etc
4SHELL := /bin/bash
5EXTDIR := ${DESTDIR}${ETCDIR}
6MODE := 754
7DIRMODE := 755
8CONFMODE := 644
9
10all:
11 @grep "^install" Makefile | cut -d ":" -f 1
12 @echo "dist"
13 @echo "Select an appropriate install target from the above list" ; exit 1
14
15.PHONY: dist
16dist:
17 rm -rf "dist/boot-scripts-cross-lfs-$(VERSION)"
18 mkdir -p "dist/boot-scripts-cross-lfs-$(VERSION)"
19 tar --exclude dist -c * | tar -x -C "dist/boot-scripts-cross-lfs-$(VERSION)"
20 (cd dist; tar -cjf "boot-scripts-cross-lfs-$(VERSION).tar.bz2" "boot-scripts-cross-lfs-$(VERSION)")
21 rm -rf "dist/boot-scripts-cross-lfs-$(VERSION)"
22
23create-dirs:
24 install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc{0,1,2,3,4,5,6,sysinit}.d
25 install -d -m ${DIRMODE} ${EXTDIR}/rc.d/init.d
26 install -d -m ${DIRMODE} ${EXTDIR}/sysconfig
27
28create-service-dir:
29 install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
30
31install-boot-scripts: create-dirs create-service-dir
32 install -m ${MODE} clfs/init.d/checkfs ${EXTDIR}/rc.d/init.d/
33 install -m ${MODE} clfs/init.d/cleanfs ${EXTDIR}/rc.d/init.d/
34 install -m ${CONFMODE} clfs/init.d/functions ${EXTDIR}/rc.d/init.d/functions
35 install -m ${MODE} clfs/init.d/halt ${EXTDIR}/rc.d/init.d/
36 install -m ${MODE} clfs/init.d/localnet ${EXTDIR}/rc.d/init.d/
37 install -m ${MODE} clfs/init.d/mountfs ${EXTDIR}/rc.d/init.d/
38 install -m ${MODE} clfs/init.d/mountkernfs ${EXTDIR}/rc.d/init.d/
39 install -m ${MODE} clfs/init.d/rc ${EXTDIR}/rc.d/init.d/
40 install -m ${MODE} clfs/init.d/reboot ${EXTDIR}/rc.d/init.d/
41 install -m ${MODE} clfs/init.d/sendsignals ${EXTDIR}/rc.d/init.d/
42 install -m ${MODE} clfs/init.d/setclock ${EXTDIR}/rc.d/init.d/
43 install -m ${MODE} clfs/init.d/swap ${EXTDIR}/rc.d/init.d/
44 install -m ${MODE} clfs/init.d/udev ${EXTDIR}/rc.d/init.d/
45 ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals
46 ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc0.d/S70mountfs
47 ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc0.d/S80swap
48 ln -sf ../init.d/halt ${EXTDIR}/rc.d/rc0.d/S99halt
49 ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals
50 ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc6.d/S70mountfs
51 ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc6.d/S80swap
52 ln -sf ../init.d/reboot ${EXTDIR}/rc.d/rc6.d/S99reboot
53 ln -sf ../init.d/mountkernfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountkernfs
54 ln -sf ../init.d/udev ${EXTDIR}/rc.d/rcsysinit.d/S10udev
55 ln -sf ../init.d/checkfs ${EXTDIR}/rc.d/rcsysinit.d/S20checkfs
56 ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rcsysinit.d/S30mountfs
57 ln -sf ../init.d/swap ${EXTDIR}/rc.d/rcsysinit.d/S40swap
58 ln -sf ../init.d/cleanfs ${EXTDIR}/rc.d/rcsysinit.d/S50cleanfs
59 ln -sf ../init.d/setclock ${EXTDIR}/rc.d/rcsysinit.d/S60setclock
60 if [ ! -f ${EXTDIR}/sysconfig/rc ]; then install -m ${CONFMODE} clfs/sysconfig/rc ${EXTDIR}/sysconfig/; fi
61 if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then install -m ${CONFMODE} clfs/sysconfig/createfiles ${EXTDIR}/sysconfig/; fi
62
63install-raq2: create-dirs
64 install -m ${MODE} clfs/init.d/paneld ${EXTDIR}/rc.d/init.d/
65 ln -sf ../init.d/paneld ${EXTDIR}/rc.d/rc0.d/K01paneld
66 ln -sf ../init.d/paneld ${EXTDIR}/rc.d/rc1.d/S99paneld
67 ln -sf ../init.d/paneld ${EXTDIR}/rc.d/rc2.d/S99paneld
68 ln -sf ../init.d/paneld ${EXTDIR}/rc.d/rc3.d/S99paneld
69 ln -sf ../init.d/paneld ${EXTDIR}/rc.d/rc4.d/S99paneld
70 ln -sf ../init.d/paneld ${EXTDIR}/rc.d/rc5.d/S99paneld
71 ln -sf ../init.d/paneld ${EXTDIR}/rc.d/rc6.d/K01paneld
72 if [ ! -f ${EXTDIR}/sysconfig/lcd ]; then install -m ${CONFMODE} clfs/sysconfig/lcd-raq2 ${EXTDIR}/sysconfig/lcd; fi
73
74install-raq3: create-dirs
75 install -m ${MODE} clfs/init.d/setlcd ${EXTDIR}/rc.d/init.d/
76 ln -sf ../init.d/setlcd ${EXTDIR}/rc.d/rc0.d/K01setlcd
77 ln -sf ../init.d/setlcd ${EXTDIR}/rc.d/rc1.d/S99setlcd
78 ln -sf ../init.d/setlcd ${EXTDIR}/rc.d/rc2.d/S99setlcd
79 ln -sf ../init.d/setlcd ${EXTDIR}/rc.d/rc3.d/S99setlcd
80 ln -sf ../init.d/setlcd ${EXTDIR}/rc.d/rc4.d/S99setlcd
81 ln -sf ../init.d/setlcd ${EXTDIR}/rc.d/rc5.d/S99setlcd
82 ln -sf ../init.d/setlcd ${EXTDIR}/rc.d/rc6.d/K01setlcd
83 if [ ! -f ${EXTDIR}/sysconfig/lcd ]; then install -m ${CONFMODE} clfs/sysconfig/lcd-raq3 ${EXTDIR}/sysconfig/lcd; fi
84
85install-lcd: create-dirs
86 if [ ! -f ${EXTDIR}/sysconfig/lcd ]; then install -m ${CONFMODE} clfs/sysconfig/lcd ${EXTDIR}/sysconfig/lcd; fi
87
88install-netboot: create-dirs create-service-dir
89 rm -rf ${EXTDIR}/rc.d
90 install -d -m ${DIRMODE} ${EXTDIR}/rc.d
91 install -m ${MODE} netboot/rc.0 ${EXTDIR}/rc.d/
92 install -m ${MODE} netboot/rc.1 ${EXTDIR}/rc.d/
93 install -m ${MODE} netboot/rc.sysinit ${EXTDIR}/rc.d/
94 if [ ! -f ${EXTDIR}/inittab ]; then install -m ${CONFMODE} netboot/inittab ${EXTDIR}/inittab; fi
95 ln -sf ../rc.d/rc.0 ${EXTDIR}/rc.d/rc.6
96 ln -sf ../rc.d/rc.1 ${EXTDIR}/rc.d/rc.2
97 ln -sf ../rc.d/rc.1 ${EXTDIR}/rc.d/rc.3
98 ln -sf ../rc.d/rc.1 ${EXTDIR}/rc.d/rc.4
99 ln -sf ../rc.d/rc.1 ${EXTDIR}/rc.d/rc.5
100
101.PHONY: all create-dirs create-service-dir \
102 install \
103 boot-scripts \
104 install-lcd \
105 install-raq2 \
106 install-raq3
Note: See TracBrowser for help on using the repository browser.