root@aaa:/etc/config# opkg list | grep bash
Syntax: /etc/init.d/network [command]
Available commands:
start Start the service
stop Stop the service
restart Restart the service
reload Reload configuration files (or restart if service does not implement reload)
enable Enable service autostart
disable Disable service autostart
enabled Check if service is started on boot
running Check if service is running
status Service status
trace Start with syscall trace
info Dump procd service info
root@aaa:/etc/config#
But wait there is more!
#grep screen abcjdjd
Syntax: /etc/init.d/network [command]
Available commands:
start Start the service
stop Stop the service
restart Restart the service
reload Reload configuration files (or restart if service does not implement reload)
enable Enable service autostart
disable Disable service autostart
enabled Check if service is started on boot
running Check if service is running
status Service status
trace Start with syscall trace
info Dump procd service info
#
Why does grep call /etc/init.d/network ?
#grep
Syntax: /etc/init.d/network [command]
Available commands:
start Start the service
stop Stop the service
restart Restart the service
reload Reload configuration files (or restart if service does not implement reload)
enable Enable service autostart
disable Disable service autostart
enabled Check if service is started on boot
running Check if service is running
status Service status
trace Start with syscall trace
info Dump procd service info
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
ubus call system board
alias
busybox grep 1 </dev/null
Well, that's your problem, something has redefined grep to be a function so it's not calling the binary. This probably came from sourcing a script somewhere, sleuthing needed.
Do this and see if it's fixed.
unset -f grep
type grep
Should say something like grep is /bin/busybox or similar.
$ grep '()' /etc/init.d/network
init_switch() {
setup_switch() { return 0; }
start_service() {
reload_service() {
...
$ grep () /etc/init.d/network
$ type grep
grep is a function
$ grep
Syntax: /etc/init.d/network [command]
Available commands:
start Start the service
stop Stop the service
restart Restart the service
reload Reload configuration files (or restart if service does not implement reload)
enable Enable service autostart
disable Disable service autostart
enabled Check if service is started on boot
running Check if service is running
status Service status
trace Start with syscall trace
info Dump procd service info