The service command on OpenWrt is a convenience wrapper around the usual init script machinery, it is defined as shell alias in /etc/profile. Maybe you customized your profile in the past without ever rebasing it.
Ref: https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/base-files/files/etc/profile#l48
service 命令是 被在 /etc/profle包裹取来的 的alias
其实执行的还是 /etc/init.d/ 中的脚本文件
service() {
[ -f "/etc/init.d/$1" ] || {
echo "service "'"'"$1"'"'" not found, the following services are available:"
ls "/etc/init.d"
return 1
}
/etc/init.d/$@
}
在 profile添加service()即可