check the "#!/bin/sh" at line1, make sure file is existing, actually just download my script from google drive then save to 192.168.1.1/usr/sbin, chmod775, run as root, it should work
try to execute like this ./usr/sbin/setchan.sh
you can also create a simple script for test as below, just vi and create a new file, chmod 775 then run it
#!/bin/sh
iwinfo
echo "hello world"
Man this is driving me a little nuts now. Even a simple test script will not execute from either /usr/sbin or /usr/bin directory. I keep getting this message and the output of ls -la:
/ # ./usr/sbin/setchan.sh
ash: ./usr/sbin/setchan.sh: not found
/ #
/ #
/ # ls -la /usr/sbin
drwxr-xr-x 2 root root 0 Apr 18 05:03 .
drwxr-xr-x 6 root root 0 Apr 18 04:34 ..
lrwxrwxrwx 1 root root 17 Apr 18 04:34 arping -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Apr 18 04:34 brctl -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Apr 18 04:34 chroot -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Apr 18 04:34 crond -> ../../bin/busybox
-rwxr-xr-x 1 root root 14120 Apr 18 04:05 fw_printenv
lrwxrwxrwx 1 root root 11 Apr 18 04:34 fw_setenv -> fw_printenv
lrwxrwxrwx 1 root root 4 Apr 18 04:34 hostapd -> wpad
lrwxrwxrwx 1 root root 16 Apr 18 04:34 insmod -> /sbin/kmodloader
-rwxr-xr-x 1 root root 78456 Apr 18 04:06 iw
lrwxrwxrwx 1 root root 16 Apr 18 04:34 lsmod -> /sbin/kmodloader
lrwxrwxrwx 1 root root 16 Apr 18 04:34 modinfo -> /sbin/kmodloader
lrwxrwxrwx 1 root root 16 Apr 18 04:34 modprobe -> /sbin/kmodloader
lrwxrwxrwx 1 root root 17 Apr 18 04:34 ntpd -> ../../bin/busybox
lrwxrwxrwx 1 root root 16 Apr 18 04:34 rmmod -> /sbin/kmodloader
-rwxrwxr-x 1 root root 2681 Apr 18 05:13 setchan.sh
lrwxrwxrwx 1 root root 17 Apr 18 04:34 telnetd -> ../../bin/busybox
-rwxrwxr-x 1 root root 38 Apr 18 05:05 test.sh
lrwxrwxrwx 1 root root 17 Apr 18 04:34 tftpd -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Apr 18 04:34 udhcpd -> ../../bin/busybox
-rwxr-xr-x 1 root root 67672 Apr 18 04:05 vsftpd
lrwxrwxrwx 1 root root 4 Apr 18 04:34 wpa_supplicant -> wpad
-rwxr-xr-x 1 root root 317432 Apr 18 04:06 wpad
Any suggestions? I'm no Linux expert but can find my way around ok. I think I must be missing something simple or my RC is not cooperating as it should. BTW, everything was edited and uploaded from a Linux box. Is there something maybe up with the PATH and/or the shell?