OpenWrt Forum Archive

Topic: [Fon2100] Script (banale) non parte...

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Ho una Fonera 2100 con openwrt kamiza v24sp1

ho creato una cartella /script in root
ci ho creato, per provare, un file prova.sh contenente solo queste due righe:

#!/bin/ash
mkdir -p /script/prova

Ho dato un bel chmod a+x /script/prova.sh

Quindi /script/prova.sh ottenendo solo "ash - command not found"

-rwxr-xr-x    1 root     root          333 Feb  7 14:48 prova.sh

Cosa sbaglio?

English please...

Seems to be you got some junk at the end of each line (did you edit your files under windoze ?)
try to open your terminal, create the same file with VI and see what happens.
sometimes happens to me with weird editors.

And write here in English, do not upset the other guys

Ciao :-)
Ben

Oh, sorry ...... for italian, sorry...

I've create the script on ubuntu with gedit, and then cut/pasted on openwrt-fonera with ftp from nautilus

Then logged in via ssh and chmodded file

realtebo wrote:

Ho una Fonera 2100 con openwrt kamiza v24sp1

ho creato una cartella /script in root
ci ho creato, per provare, un file prova.sh contenente solo queste due righe:

#!/bin/ash
mkdir -p /script/prova

Ho dato un bel chmod a+x /script/prova.sh

Quindi /script/prova.sh ottenendo solo "ash - command not found"

-rwxr-xr-x    1 root     root          333 Feb  7 14:48 prova.sh

Cosa sbaglio?

Try

./script/prova.sh

The discussion might have continued from here.