What's new

Problem in repeater mode... #!/bin/sh: not found ... works find in AP mode?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Livin

Senior Member
I run two AC68U Routers... one as a repeater.

Both run the identical start scripts but when in Repeater mode it seems it has an issue. Should I be doing something differet?

admin@TM-AC1900-1620:/jffs/scripts# sh services-start
admin@TM-AC1900-1620:/jffs/scripts# /jffs/scripts/occupancy_TM1900.sh: line 1: #!/bin/sh: not found

thx!
 
I run two AC68U Routers... one as a repeater.

Both run the identical start scripts but when in Repeater mode it seems it has an issue. Should I be doing something differet?

admin@TM-AC1900-1620:/jffs/scripts# sh services-start
admin@TM-AC1900-1620:/jffs/scripts# /jffs/scripts/occupancy_TM1900.sh: line 1: #!/bin/sh: not found

thx!
Most likely it was copied to that router in DOS/WIN format instead of Linux format. Open it in vi and look for ^M carriage return characters.
 
Maybe there is some hidden character in the shebang line?
Open it in "vi" (or whatever editing method you prefer) and remove the shebang line and re-enter it.

Does "/bin/sh" exist? (It should)

Edit: John is quicker than I... :mad:

:)
 
Code:
sed -i 's/\r//g' services-start

Should fix it.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top