Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

很怪 脚本好像不起作用 #1

Open
daiaji opened this issue Oct 12, 2018 · 0 comments
Open

很怪 脚本好像不起作用 #1

daiaji opened this issue Oct 12, 2018 · 0 comments

Comments

@daiaji
Copy link

daiaji commented Oct 12, 2018

arp -a|grep -c "192.168.1.104"
1
root@OpenWrt:~# ./test.sh start
/etc/rc.common: line 3: arp: not found
0
root@OpenWrt:~# cat ./test.sh 
#!/bin/sh /etc/rc.common
start() {
        arpnum=$(arp -a|grep -c "192.168.1.104")
        echo "$arpnum"
}

什么鬼?……
命令内容是一样的 但是什么鬼

openwrt论坛那边https://forum.openwrt.org/t/whats-wrong-with-this-script-arp-not-found/23088
似乎是如果busybox编译的时候没有选择arp的话 arp就只是一个变量……

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant