systemd开机启动

SUMMARY = "rvc_os temporary version"
HOMEPAGE = "http://www.desay-svautomotive.com"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SECTION = "SVP"

PACKAGE_ARCH = "${MACHINE_ARCH}"

SRC_URI = " \
	file://rvc-tmp-late.service \
	file://rvc-tmp-late.sh \
"

inherit systemd

PACKAGES = "${PN} rvc-tmp-late"

SYSTEMD_PACKAGES += "rvc-tmp-late"
SYSTEMD_SERVICE_rvc-tmp-late = "rvc-tmp-late.service"

do_install() {
	install -d ${D}${systemd_unitdir}/system
	install -d ${D}${sysconfdir}/scripts
	install -c -m 0644 ${WORKDIR}/rvc-tmp-late.service ${D}${systemd_unitdir}/system
	install -c -m 0755 ${WORKDIR}/rvc-tmp-late.sh      ${D}${sysconfdir}/scripts
}

RDEPENDS_${PN} += "rvc-tmp-late"
编译生成的目录:
[ubuntu @packages-split]$ tree
.
├── rvc-tmp
│     └── etc
│       └── scripts
│           └── rvc-tmp-late.sh
└── rvc-tmp-late  注意这两个目录不能相同,否则do_package报错!
    └── lib
        └── systemd
            └── system
                └── rvc-tmp-late.service

猜你喜欢

转载自www.cnblogs.com/hellokitty2/p/9200878.html