blob: c5cd7a97bcb474b1b5d2ec628f947d561acb5be1 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "The canonical example of init scripts"
2SECTION = "base"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYRIGHT;md5=349c872e0066155e1818b786938876a4"
5
6SRC_URI = "file://skeleton \
7 file://skeleton_test.c \
8 file://COPYRIGHT \
9 "
10
11do_compile () {
12 ${CC} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test
13}
14
15do_install () {
16 install -d ${D}${sysconfdir}/init.d
17 cat ${WORKDIR}/skeleton | \
18 sed -e 's,/etc,${sysconfdir},g' \
19 -e 's,/usr/sbin,${sbindir},g' \
20 -e 's,/var,${localstatedir},g' \
21 -e 's,/usr/bin,${bindir},g' \
22 -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/skeleton
23 chmod a+x ${D}${sysconfdir}/init.d/skeleton
24
25 install -d ${D}${sbindir}
26 install -m 0755 ${WORKDIR}/skeleton-test ${D}${sbindir}/
27}
28
29RDEPENDS_${PN} = "initscripts"
30
31CONFFILES_${PN} += "${sysconfdir}/init.d/skeleton"