packages icon indicating copy to clipboard operation
packages copied to clipboard

ntpdate.init 的 init.d 文件会在imageBuilder 打包阶段报错 uci command not found

Open zhangguanzhang opened this issue 2 years ago • 0 comments

https://github.com/immortalwrt/packages/blob/master/net/ntpd/files/ntpdate.init#L7 现在比较新的分支的 openwrt 的/etc/init.d/ 里的脚本会被上层调用,里面的shell 基本是写成 变量和函数,这里调用 uci 之类的系统命令的话,会在 imageBuilder make image 的时候报错

Enabling ntpdate
./etc/init.d/ntpdate: line 7: uci: command not found

目前我是 hack 文件

if [ -f feeds/packages/net/ntpd/files/ntpdate.init ];then
    sed -i '2a [ ! -f /etc/openwrt_release ] && exit 0' feeds/packages/net/ntpd/files/ntpdate.init
fi

但是应该有 IPKG_INSTROOT 之类的 chroot 里去执行才对

zhangguanzhang avatar Jun 06 '22 03:06 zhangguanzhang