2011-05-23 04:41:56 +01:00
|
|
|
ETCDIR=/etc/rc.d
|
2008-06-03 22:51:14 +01:00
|
|
|
EXTDIR=${DESTDIR}${ETCDIR}
|
|
|
|
MODE=754
|
|
|
|
DIRMODE=755
|
|
|
|
CONFMODE=644
|
|
|
|
|
|
|
|
all: install
|
|
|
|
|
|
|
|
create-dirs:
|
2011-05-15 01:17:32 +01:00
|
|
|
if test ! -d /${DESTDIR}; then install -d -m ${DIRMODE} ${EXTDIR}; fi
|
2008-06-03 22:51:14 +01:00
|
|
|
install -d -m ${DIRMODE} ${EXTDIR}/rc0.d
|
|
|
|
install -d -m ${DIRMODE} ${EXTDIR}/rc1.d
|
|
|
|
install -d -m ${DIRMODE} ${EXTDIR}/rc2.d
|
|
|
|
install -d -m ${DIRMODE} ${EXTDIR}/rc3.d
|
|
|
|
install -d -m ${DIRMODE} ${EXTDIR}/rc4.d
|
|
|
|
install -d -m ${DIRMODE} ${EXTDIR}/rc5.d
|
|
|
|
install -d -m ${DIRMODE} ${EXTDIR}/rc6.d
|
2008-08-31 07:24:27 +01:00
|
|
|
install -d -m ${DIRMODE} ${EXTDIR}/rcS.d
|
2008-06-03 22:51:14 +01:00
|
|
|
install -d -m ${DIRMODE} ${EXTDIR}/init.d
|
2011-05-23 04:41:56 +01:00
|
|
|
install -d -m ${DIRMODE} ${DESTDIR}/etc/default
|
|
|
|
install -d -m ${DIRMODE} ${DESTDIR}/etc/network
|
2011-05-15 01:17:32 +01:00
|
|
|
install -d -m ${DIRMODE} ${DESTDIR}/sbin
|
2008-06-03 22:51:14 +01:00
|
|
|
install -d -m ${DIRMODE} ${DESTDIR}/lib/lsb
|
2011-05-14 20:41:18 +01:00
|
|
|
install -d -m ${DIRMODE} ${DESTDIR}/lib/network-services
|
2011-05-23 04:43:35 +01:00
|
|
|
if [ ${ETCDIR} != /etc ]; then ln -s ${ETCDIR}/init.d ${DESTDIR}/etc/init.d; fi
|
2008-06-03 22:51:14 +01:00
|
|
|
|
2011-05-14 20:41:18 +01:00
|
|
|
install: create-dirs
|
|
|
|
install -m ${MODE} etc/init.d/checkfs ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/cleanfs ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/halt ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/console ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/localnet ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/modules ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/mountfs ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/mountvirtfs ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/network ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/rc ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/reboot ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/sendsignals ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/setclock ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/sysklogd ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/swap ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/sysctl ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/template ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/udev ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/udev_retry ${EXTDIR}/init.d/
|
|
|
|
install -m ${CONFMODE} lib/lsb/init-functions ${DESTDIR}/lib/lsb/
|
2011-05-23 04:41:56 +01:00
|
|
|
if [ ! -f ${DESTDIR}/etc/default/createfiles ]; then install -m ${CONFMODE} etc/default/createfiles ${DESTDIR}/etc/default/; fi
|
|
|
|
if [ ! -f ${DESTDIR}/etc/default/modules ]; then install -m ${CONFMODE} etc/default/modules ${DESTDIR}/etc/default/; fi
|
|
|
|
if [ ! -f ${DESTDIR}/etc/default/rc ]; then install -m ${CONFMODE} etc/default/rc ${DESTDIR}/etc/default/; fi
|
|
|
|
if [ ! -f ${DESTDIR}/etc/default/rc.site ]; then install -m ${CONFMODE} etc/default/rc.site ${DESTDIR}/etc/default/; fi
|
2011-05-14 20:41:18 +01:00
|
|
|
install -m ${MODE} sbin/ifup ${DESTDIR}/sbin/
|
|
|
|
install -m ${MODE} sbin/ifdown ${DESTDIR}/sbin/
|
|
|
|
install -m ${MODE} lib/network-services/ipv4-static ${DESTDIR}/lib/network-services/
|
|
|
|
install -m ${MODE} lib/network-services/ipv4-static-route ${DESTDIR}/lib/network-services/
|
2008-09-14 16:51:59 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/checkfs
|
2008-09-07 17:27:29 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/cleanfs
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/halt
|
2008-09-14 16:51:59 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/console
|
2008-09-07 17:27:29 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/localnet
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/modules
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountfs
|
2011-04-19 04:26:49 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountvirtfs
|
2008-09-07 17:27:29 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/network
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/reboot
|
2008-09-14 16:51:59 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/sendsignals
|
2008-09-07 17:27:29 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/sysklogd
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/swap
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/sysctl
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/udev
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/udev_retry
|
2011-05-23 04:41:56 +01:00
|
|
|
sed 's@ETCDIR@${ETCDIR}@' -i ${DESTDIR}/etc/default/rc
|
2008-06-03 22:51:14 +01:00
|
|
|
|
2011-05-14 20:41:18 +01:00
|
|
|
minimal: create-dirs
|
|
|
|
install -m ${MODE} etc/init.d/checkfs ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/cleanfs ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/halt ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/localnet ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/mountfs ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/mountvirtfs ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/rc ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/reboot ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/sendsignals ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/detclock ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/swap ${EXTDIR}/init.d/
|
|
|
|
install -m ${MODE} etc/init.d/udev ${EXTDIR}/init.d/
|
|
|
|
install -m ${CONFMODE} lib/lsb/init-functions ${DESTDIR}/lib/lsb/
|
2011-05-23 04:41:56 +01:00
|
|
|
if [ ! -f ${DESTDIR}/etc/default/rc ]; then install -m ${CONFMODE} default/rc ${DESTDIR}/etc/default/; fi
|
2008-09-14 16:51:59 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/checkfs
|
2008-09-07 17:27:29 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/cleanfs
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/halt
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/localnet
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountfs
|
2011-04-19 04:26:49 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountvirtfs
|
2008-09-07 17:27:29 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/reboot
|
2008-09-14 16:51:59 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/sendsignals
|
2008-09-07 17:27:29 +01:00
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/swap
|
|
|
|
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/udev
|
2008-06-03 22:51:14 +01:00
|
|
|
|
2011-05-14 20:41:18 +01:00
|
|
|
.PHONY: all create-dirs install minimal
|
2008-06-03 22:51:14 +01:00
|
|
|
|