aboutsummaryrefslogtreecommitdiffstats
path: root/bootscripts/Makefile
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2011-08-02 02:15:42 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2011-08-02 02:15:42 +0000
commit0cda8984a835f37a573c0e2eb31676ff52773d16 (patch)
tree15144b985754fc6ac96540d091ef7682694c5781 /bootscripts/Makefile
parent75fe59983cbfe4a5e5cec2a161cda0491162908c (diff)
Rewrite bootscripts and Chaper 7
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9574 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts/Makefile')
-rw-r--r--bootscripts/Makefile60
1 files changed, 31 insertions, 29 deletions
diff --git a/bootscripts/Makefile b/bootscripts/Makefile
index 54b8f6562..2dfde6ed3 100644
--- a/bootscripts/Makefile
+++ b/bootscripts/Makefile
@@ -1,5 +1,6 @@
ETCDIR=/etc
EXTDIR=${DESTDIR}${ETCDIR}
+LIBDIR=${DESTDIR}/lib/boot
MODE=754
DIRMODE=755
CONFMODE=644
@@ -17,14 +18,13 @@ create-dirs:
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rcsysinit.d
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/init.d
install -d -m ${DIRMODE} ${EXTDIR}/sysconfig
+ install -d -m ${DIRMODE} ${LIBDIR}
-create-service-dir:
- install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
-
-install: create-dirs create-service-dir
+install: create-dirs
install -m ${MODE} lfs/init.d/checkfs ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/cleanfs ${EXTDIR}/rc.d/init.d/
install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/
+ install -m ${CONFMODE} lfs/init.d/functions ${LIBDIR}
install -m ${MODE} lfs/init.d/halt ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/console ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/consolelog ${EXTDIR}/rc.d/init.d/
@@ -37,31 +37,31 @@ install: create-dirs create-service-dir
install -m ${MODE} lfs/init.d/reboot ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/sendsignals ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/setclock ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/sysklogd ${EXTDIR}/rc.d/init.d/
+ install -m ${MODE} lfs/init.d/sysklogd ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/swap ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/sysctl ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/template ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/udev ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/udev_retry ${EXTDIR}/rc.d/init.d/
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc0.d/K80network
- ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc0.d/K90sysklogd
+ ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc0.d/K90sysklogd
ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals
ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc0.d/S70mountfs
ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc0.d/S80swap
ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rc0.d/S90localnet
ln -sf ../init.d/halt ${EXTDIR}/rc.d/rc0.d/S99halt
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc1.d/K80network
- ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc1.d/K90sysklogd
+ ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc1.d/K90sysklogd
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc2.d/K80network
- ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc2.d/K90sysklogd
- ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc3.d/S10sysklogd
+ ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc2.d/K90sysklogd
+ ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc3.d/S10sysklogd
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc3.d/S20network
- ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc4.d/S10sysklogd
+ ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc4.d/S10sysklogd
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc4.d/S20network
- ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc5.d/S10sysklogd
+ ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc5.d/S10sysklogd
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc5.d/S20network
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc6.d/K80network
- ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc6.d/K90sysklogd
+ ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc6.d/K90sysklogd
ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals
ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc6.d/S70mountfs
ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc6.d/S80swap
@@ -79,28 +79,29 @@ install: create-dirs create-service-dir
ln -sf ../init.d/console ${EXTDIR}/rc.d/rcsysinit.d/S70console
ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rcsysinit.d/S80localnet
ln -sf ../init.d/sysctl ${EXTDIR}/rc.d/rcsysinit.d/S90sysctl
- if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then install -m ${CONFMODE} lfs/sysconfig/createfiles ${EXTDIR}/sysconfig/; fi
- if [ ! -f ${EXTDIR}/sysconfig/modules ]; then install -m ${CONFMODE} lfs/sysconfig/modules ${EXTDIR}/sysconfig/; fi
- if [ ! -f ${EXTDIR}/sysconfig/rc ]; then install -m ${CONFMODE} lfs/sysconfig/rc ${EXTDIR}/sysconfig/; fi
- install -m ${MODE} lfs/sysconfig/network-devices/ifup ${EXTDIR}/sysconfig/network-devices/
- install -m ${MODE} lfs/sysconfig/network-devices/ifdown ${EXTDIR}/sysconfig/network-devices/
- install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static ${EXTDIR}/sysconfig/network-devices/services/
- install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static-route ${EXTDIR}/sysconfig/network-devices/services/
+ if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then \
+ install -m ${CONFMODE} lfs/sysconfig/createfiles ${EXTDIR}/sysconfig/ ;\
+ fi
+ if [ ! -f ${EXTDIR}/sysconfig/modules ]; then \
+ install -m ${CONFMODE} lfs/sysconfig/modules ${EXTDIR}/sysconfig/ ;\
+ fi
+ if [ ! -f ${EXTDIR}/sysconfig/rc ]; then \
+ install -m ${CONFMODE} lfs/sysconfig/rc ${EXTDIR}/sysconfig/ ;\
+ fi
+ install -m ${MODE} lfs/sysconfig/network-devices/ifup /sbin
+ install -m ${MODE} lfs/sysconfig/network-devices/ifdown /sbin
+ install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static ${LIBDIR}
+ install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static-route ${LIBDIR}
install-consolelog: create-dirs
install -m ${MODE} contrib/init.d/consolelog ${EXTDIR}/rc.d/init.d
ln -sf ../init.d/consolelog ${EXTDIR}/rc.d/rcsysinit.d/S00consolelog
-install-lsb-compliant:
- make -C contrib/lsb
-
-install-service-mtu: create-service-dir
- install -m ${MODE} contrib/sysconfig/network-devices/services/mtu ${EXTDIR}/sysconfig/network-devices/services
-
-minimal: create-dirs create-service-dir
+minimal: create-dirs
install -m ${MODE} lfs/init.d/checkfs ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/cleanfs ${EXTDIR}/rc.d/init.d/
install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/
+ install -m ${CONFMODE} lfs/init.d/functions ${LIBDIR}
install -m ${MODE} lfs/init.d/halt ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/localnet ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/mountfs ${EXTDIR}/rc.d/init.d/
@@ -125,8 +126,9 @@ minimal: create-dirs create-service-dir
ln -sf ../init.d/checkfs ${EXTDIR}/rc.d/rcsysinit.d/S30checkfs
ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rcsysinit.d/S40mountfs
ln -sf ../init.d/cleanfs ${EXTDIR}/rc.d/rcsysinit.d/S45cleanfs
- if [ ! -f ${EXTDIR}/sysconfig/rc ]; then install -m ${CONFMODE} lfs/sysconfig/rc ${EXTDIR}/sysconfig/; fi
+ if [ ! -f ${EXTDIR}/sysconfig/rc ]; then \
+ install -m ${CONFMODE} lfs/sysconfig/rc ${EXTDIR}/sysconfig/; \
+ fi
-.PHONY: all create-dirs create-service-dir \
- install install-service-mtu
+.PHONY: all create-dirs install