2014-04-03 22:52:09 +01:00
|
|
|
ETCDIR=${DESTDIR}/etc
|
|
|
|
LIBDIR=${DESTDIR}/lib
|
|
|
|
SERVICEDIR=${LIBDIR}/services
|
2011-09-21 19:24:09 +01:00
|
|
|
MAN8=${DESTDIR}/usr/share/man/man8
|
|
|
|
SBIN=${DESTDIR}/sbin
|
2008-06-03 22:51:14 +01:00
|
|
|
MODE=754
|
|
|
|
DIRMODE=755
|
|
|
|
CONFMODE=644
|
|
|
|
|
2011-09-19 04:31:46 +01:00
|
|
|
all: links
|
|
|
|
|
|
|
|
install: all
|
2008-06-03 22:51:14 +01:00
|
|
|
|
|
|
|
create-dirs:
|
2014-04-03 22:52:09 +01:00
|
|
|
install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc0.d
|
|
|
|
install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc1.d
|
|
|
|
install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc2.d
|
|
|
|
install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc3.d
|
|
|
|
install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc4.d
|
|
|
|
install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc5.d
|
|
|
|
install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc6.d
|
|
|
|
install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rcS.d
|
|
|
|
install -d -m ${DIRMODE} ${ETCDIR}/rc.d/init.d
|
|
|
|
install -d -m ${DIRMODE} ${ETCDIR}/sysconfig
|
2011-10-08 17:25:33 +01:00
|
|
|
install -d -m ${DIRMODE} ${LIBDIR}
|
2014-04-03 22:52:09 +01:00
|
|
|
install -d -m ${DIRMODE} ${SERVICEDIR}
|
2011-10-08 03:12:06 +01:00
|
|
|
install -d -m ${DIRMODE} ${MAN8}
|
|
|
|
install -d -m ${DIRMODE} ${SBIN}
|
2014-04-03 22:52:09 +01:00
|
|
|
ln -sfn services ${LIBDIR}/lsb
|
2014-05-11 16:02:47 +01:00
|
|
|
ln -sfn rc.d/init.d ${ETCDIR}/init.d
|
2008-06-03 22:51:14 +01:00
|
|
|
|
2011-09-19 04:31:46 +01:00
|
|
|
files: create-dirs
|
2014-04-03 22:52:09 +01:00
|
|
|
install -m ${MODE} lfs/init.d/checkfs ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/cleanfs ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/halt ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/console ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/localnet ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/modules ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/mountfs ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/mountvirtfs ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/network ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/rc ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/reboot ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/sendsignals ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/setclock ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/swap ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/sysctl ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/sysklogd ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/template ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/udev ${ETCDIR}/rc.d/init.d/
|
|
|
|
install -m ${MODE} lfs/init.d/udev_retry ${ETCDIR}/rc.d/init.d/
|
2011-09-21 19:24:09 +01:00
|
|
|
install -m ${MODE} lfs/sbin/ifup ${SBIN}
|
|
|
|
install -m ${MODE} lfs/sbin/ifdown ${SBIN}
|
2014-04-03 22:52:09 +01:00
|
|
|
install -m ${CONFMODE} lfs/sbin/ifup.8 ${MAN8}
|
2011-11-14 20:40:06 +00:00
|
|
|
ln -sf ifup.8 ${MAN8}/ifdown.8
|
2014-04-03 22:52:09 +01:00
|
|
|
install -m ${MODE} lfs/lib/services/ipv4-static-route ${SERVICEDIR}
|
|
|
|
install -m ${MODE} lfs/lib/services/ipv4-static ${SERVICEDIR}
|
|
|
|
install -m ${CONFMODE} lfs/lib/services/init-functions ${SERVICEDIR}
|
|
|
|
|
|
|
|
if [ ! -f ${ETCDIR}/sysconfig/createfiles ]; then \
|
|
|
|
install -m ${CONFMODE} lfs/sysconfig/createfiles ${ETCDIR}/sysconfig/ ;\
|
2011-09-21 19:27:48 +01:00
|
|
|
fi
|
2014-04-03 22:52:09 +01:00
|
|
|
if [ ! -f ${ETCDIR}/sysconfig/modules ]; then \
|
|
|
|
install -m ${CONFMODE} lfs/sysconfig/modules ${ETCDIR}/sysconfig/ ;\
|
2011-09-21 19:27:48 +01:00
|
|
|
fi
|
2014-04-03 22:52:09 +01:00
|
|
|
if [ ! -f ${ETCDIR}/sysconfig/udev_retry ]; then \
|
|
|
|
install -m ${CONFMODE} lfs/sysconfig/udev_retry ${ETCDIR}/sysconfig/ ;\
|
2011-10-06 16:35:49 +01:00
|
|
|
fi
|
2014-04-03 22:52:09 +01:00
|
|
|
if [ ! -f ${ETCDIR}/sysconfig/rc.site ]; then \
|
|
|
|
install -m ${CONFMODE} lfs/sysconfig/rc.site ${ETCDIR}/sysconfig/ ;\
|
2011-09-21 19:27:48 +01:00
|
|
|
fi
|
2011-09-19 04:31:46 +01:00
|
|
|
|
2011-09-21 19:24:09 +01:00
|
|
|
links: rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6
|
2011-09-19 04:31:46 +01:00
|
|
|
|
2011-09-21 19:24:09 +01:00
|
|
|
rcS: files
|
2014-04-03 22:52:09 +01:00
|
|
|
ln -sf ../init.d/mountvirtfs ${ETCDIR}/rc.d/rcS.d/S00mountvirtfs
|
|
|
|
ln -sf ../init.d/modules ${ETCDIR}/rc.d/rcS.d/S05modules
|
|
|
|
ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rcS.d/S08localnet
|
|
|
|
ln -sf ../init.d/udev ${ETCDIR}/rc.d/rcS.d/S10udev
|
|
|
|
ln -sf ../init.d/swap ${ETCDIR}/rc.d/rcS.d/S20swap
|
|
|
|
ln -sf ../init.d/checkfs ${ETCDIR}/rc.d/rcS.d/S30checkfs
|
|
|
|
ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rcS.d/S40mountfs
|
|
|
|
ln -sf ../init.d/cleanfs ${ETCDIR}/rc.d/rcS.d/S45cleanfs
|
|
|
|
ln -sf ../init.d/udev_retry ${ETCDIR}/rc.d/rcS.d/S50udev_retry
|
|
|
|
ln -sf ../init.d/console ${ETCDIR}/rc.d/rcS.d/S70console
|
|
|
|
ln -sf ../init.d/sysctl ${ETCDIR}/rc.d/rcS.d/S90sysctl
|
2011-09-19 04:31:46 +01:00
|
|
|
|
2011-09-21 19:24:09 +01:00
|
|
|
rc0: files
|
2014-04-03 22:52:09 +01:00
|
|
|
ln -sf ../init.d/network ${ETCDIR}/rc.d/rc0.d/K80network
|
|
|
|
ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc0.d/K90sysklogd
|
|
|
|
ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc0.d/S60sendsignals
|
|
|
|
ln -sf ../init.d/swap ${ETCDIR}/rc.d/rc0.d/S65swap
|
|
|
|
ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rc0.d/S70mountfs
|
|
|
|
ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rc0.d/S90localnet
|
|
|
|
ln -sf ../init.d/halt ${ETCDIR}/rc.d/rc0.d/S99halt
|
2011-09-19 04:31:46 +01:00
|
|
|
|
2011-09-21 19:24:09 +01:00
|
|
|
rc1: files
|
2014-04-03 22:52:09 +01:00
|
|
|
ln -sf ../init.d/network ${ETCDIR}/rc.d/rc1.d/K80network
|
|
|
|
ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc1.d/K90sysklogd
|
2011-09-19 04:31:46 +01:00
|
|
|
|
2011-09-21 19:24:09 +01:00
|
|
|
rc2: files
|
2014-04-03 22:52:09 +01:00
|
|
|
ln -sf ../init.d/network ${ETCDIR}/rc.d/rc2.d/K80network
|
|
|
|
ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc2.d/K90sysklogd
|
2011-09-19 04:31:46 +01:00
|
|
|
|
2011-09-21 19:24:09 +01:00
|
|
|
rc3: files
|
2014-04-03 22:52:09 +01:00
|
|
|
ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc3.d/S10sysklogd
|
|
|
|
ln -sf ../init.d/network ${ETCDIR}/rc.d/rc3.d/S20network
|
2011-09-19 04:31:46 +01:00
|
|
|
|
2011-09-21 19:24:09 +01:00
|
|
|
rc4: files
|
2014-04-03 22:52:09 +01:00
|
|
|
ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc4.d/S10sysklogd
|
|
|
|
ln -sf ../init.d/network ${ETCDIR}/rc.d/rc4.d/S20network
|
2011-09-19 04:31:46 +01:00
|
|
|
|
2011-09-21 19:24:09 +01:00
|
|
|
rc5: files
|
2014-04-03 22:52:09 +01:00
|
|
|
ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc5.d/S10sysklogd
|
|
|
|
ln -sf ../init.d/network ${ETCDIR}/rc.d/rc5.d/S20network
|
2011-09-19 04:31:46 +01:00
|
|
|
|
2011-09-21 19:24:09 +01:00
|
|
|
rc6: files
|
2014-04-03 22:52:09 +01:00
|
|
|
ln -sf ../init.d/network ${ETCDIR}/rc.d/rc6.d/K80network
|
|
|
|
ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc6.d/K90sysklogd
|
|
|
|
ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc6.d/S60sendsignals
|
|
|
|
ln -sf ../init.d/swap ${ETCDIR}/rc.d/rc6.d/S65swap
|
|
|
|
ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rc6.d/S70mountfs
|
|
|
|
ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rc6.d/S90localnet
|
|
|
|
ln -sf ../init.d/reboot ${ETCDIR}/rc.d/rc6.d/S99reboot
|
2008-06-03 22:51:14 +01:00
|
|
|
|
2011-09-21 19:24:09 +01:00
|
|
|
uninstall:
|
2014-04-03 22:52:09 +01:00
|
|
|
rm -rf ${DESTDIR}/lib/services ${DESTDIR}/lib/lsb ${ETCDIR}/rc.d ${ETCDIR}/init.d \
|
|
|
|
${SBIN}/ifup ${SBIN}/ifdown ${MAN8}/ifup.8 ${MAN8}/ifdown.8 \
|
|
|
|
${ETCDIR}/sysconfig/rc
|
2011-09-21 19:24:09 +01:00
|
|
|
|
|
|
|
.PHONY: all create-dirs install files links rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6 uninstall
|
2008-06-03 22:51:14 +01:00
|
|
|
|