05-03-2007, 06:32 AM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: May 2007
|
Shell Access - Installed Correctly?
Hello everyone.
I wondering why my scripts aren't working. I downloaded the 'script access' update as described through iDS however, cannot seem to run scripts. When I select them, nothing happens. For example a script in the root of the memory called myip.sh Code: #!/bin/sh export scriptdir=`/usr/bin/dirname $0` cd $scriptdir mkdir testdir ifconfig -a > testdir/lan.txt Any help would be much appreciated! |
05-03-2007, 07:13 AM | #2 |
No es el toro que piensas
Posts: 44
Karma: 10
Join Date: Mar 2007
Device: iRex iliad
|
Hi,
I init all my scripts with: Code:
export DISPLAY=:0 export scriptdir=`/usr/bin/dirname $0` cd $scriptdir #put here your own stuff Hope this helps you and welcome to mobileread! |
Advert | |
|
05-03-2007, 08:02 AM | #4 |
Pac-Man caught my iLiad.
Posts: 807
Karma: 3595
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: Boox Max Lumi, iRex iLiad (RIP)
|
Did you try any of the MR apps? Does it work?
Does your script file have unix encoding ["Line Feed only"]? @tororebelde: We don't need a manifest.xml to start a .sh. |
05-03-2007, 08:03 AM | #5 | |
Groupie
Posts: 180
Karma: 66830
Join Date: Oct 2006
Device: IREX iLiad, Pocketbook Pro 903
|
Quote:
The scripts should be according to UNIX file format, so only linefeeds at the end of lines, no CR's. If you work on a PC a way to achieve that is use the program DOS2UNIX |
|
Advert | |
|
05-03-2007, 08:03 AM | #6 | |
Enthusiast
Posts: 42
Karma: 145
Join Date: Oct 2006
Device: iLiad
|
Quote:
OTOH, it's a good idea to let the script start with #!/bin/sh since that makes it possible to run the script from a command line. Regarding the problem rexcrieg has it seems to me that the shell access has not been successfully downloaded. |
|
05-03-2007, 09:57 AM | #7 |
Junior Member
Posts: 8
Karma: 10
Join Date: May 2007
|
Thanks for all the replies. I'm thinking along the lines that the update didn't install correctly. According to iRex's records I have 'successfully' downloaded the update.
I'm sure my line endings are correct as I'm a linux man. I will try the update again from home tonight. If anyone has any further thoughts / suggestions or even a 'working' test script to create a directory in the contentlister or even a text file. It'd be much appreciated! Thanks all. |
05-03-2007, 05:20 PM | #8 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
I know you aren't doing this but just in case someone stumbles into this thread some day, if your .sh file is on a EXT2/3 storage card you must have execute permission set on the .sh file (and any executables inside the .sh folder...) chmod +x <your>.sh
Here is my ifconfig.sh script that I have on my internal memory: ifconfig -a >/mnt/free/if.txt One line, works great. I also keep a pair of these scripts on internal memory to deal with the !@#$ can't mount storage card timing issue: mount /dev/hda1 /mnt/cf If the card is already mounted you won't hurt anything. Running the script has always gotten my CF or MMC card mounted, where un-plugging/re-plugging might or might not. |
05-03-2007, 07:33 PM | #9 |
Junior Member
Posts: 8
Karma: 10
Join Date: May 2007
|
Hi Everyone,
Still can't run shell scripts. I downloaded the update from home (saw that the download was complete) It didn't however automatically reset. So I reset the Iliad manually. I then went into Main memory -> newspapers and ran a simple program as listed above to create a directory in the current directory. Still no luck, Is there something I'm missing????????? (Going a bit mad by this point) |
05-07-2007, 05:35 AM | #10 |
No es el toro que piensas
Posts: 44
Karma: 10
Join Date: Mar 2007
Device: iRex iliad
|
@yokos, mtas
Thank you guys to point me about the manifest.xml tip. Didn't know that, but I want to learn more so your comments are really welcome! @rexcrieg Have you tried with a visual executable, i.e. mrxvt? Just to be sure you have the shell script extension well installed. -- Sure it may be ok, but don't understand why you have those problems. Doing a shell that creates a directory is not to find that it don't works. Really weird. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
iLiad shell access problem.. | wklee | iRex Developer's Corner | 10 | 07-20-2008 07:22 AM |
Problem getting shell access | templario | iRex | 1 | 03-17-2008 10:25 PM |
Can't get shell access | MarkRPenn | iRex | 11 | 10-26-2007 06:58 PM |
Shell Access ? | grayfox | iRex | 6 | 10-14-2007 04:56 PM |
2.11 Shell Access is Working Again | Adam B. | iRex | 18 | 10-01-2007 02:38 AM |