【发布时间】:2022-01-27 22:18:35
【问题描述】:
我正在尝试将文件 my-cronjob.cron 添加到我的新元层内的 /etc/cron.d 中
文件树如下:
meta-customLayer
└── recipes-myCustomLayer
└── myCustomLayer
├── files
│ └── my-cronjob.cron
└── myCustomLayer.bb
我的 CustomLayer.bb :
PR = "r0"
PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-staticdev"
RDEPENDS_${PN}-staticdev = ""
RDEPENDS_${PN}-dev = ""
RDEPENDS_${PN}-dbg = ""
RDEPENDS_${PN} = ""
do_install() {
install -d ${D}/${sysconfdir}/cron.d
install -m 755 "${THISDIR}/files/testApp-cronjob.cron" ${sysconfdir}/cron.d/
}
FILES_${PN} += "${sysconfdir}/cron.d/testApp-cronjob"
当我尝试构建 imahge 时,出现以下错误:
ERROR: myCustomLayer-1.0-r0 do_install: Execution of '/***/imx-yocto/build-core-image-base/tmp/work/cortexa35-poky-linux/myCustomLayer/1.0-r0/temp/run.do_install.16326' failed with exit code 1:
install: cannot create regular file '/etc/cron.d/testApp-cronjob.cron': Permission denied
知道为什么会出现此错误吗?有什么办法可以将此 cronjob 添加到 yocto 中?
【问题讨论】:
-
请将原问题stackoverflow.com/questions/70847881/…的答案标记为已接受,您可以在同一线程上跟进,而不是提出其他问题