Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-24-2008, 09:31 AM   #1
ragdoll
Connoisseur
ragdoll began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Oct 2007
Device: iRex iLiad V1
Can't run my first script

I'm trying to run a script to start dropbear, using the code found on this thread.
It looks like this
#!/bin/sh
/etc/init.d/dropbear start

Then I created this manifest:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<package>
<metadata>
<dc-metadata>
<Title>startDropBear</Title>
<Description>start ssh</Description>
<Date>2008-01-24T12:01:46</Date>
</dc-metadata>
<y-metadata>
<startpage>startDropBear.sh</startpage>
</y-metadata>
</metadata>
</package>

The icon of the directory is the one of the big X, meaning that I can do nothing with it.
I verified using mrxvt that command
/etc/init.d/dropbear start
run from the shell does work.
Where am I wrong?
ragdoll is offline   Reply With Quote
Old 01-24-2008, 09:56 AM   #2
tribble
iLiad Maniac
tribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it is
 
tribble's Avatar
 
Posts: 1,382
Karma: 2369
Join Date: Apr 2006
Location: Germany
Device: Bookeen Opus (i love that thing) and iPad (what an irony)
The X icon means only, that there is no standard icon associated with the sh files. It should work anyway.

Maybe putting this on line 2 will help:
scriptdir=`/usr/bin/dirname $0`
tribble is offline   Reply With Quote
Advert
Old 01-24-2008, 10:31 AM   #3
ragdoll
Connoisseur
ragdoll began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Oct 2007
Device: iRex iLiad V1
Quote:
Originally Posted by tribble View Post
The X icon means only, that there is no standard icon associated with the sh files. It should work anyway.

Maybe putting this on line 2 will help:
scriptdir=`/usr/bin/dirname $0`
This is the new code, now working:
#!/bin/sh
export DISPLAY=:0
export scriptdir=`/usr/bin/dirname $0`
cd $scriptdir
/etc/init.d/dropbear start

I copied lines 2-4 from mrxvt's run.sh code. I think lines 2 and 4 are not necessary. I suspect that line 1 is also useless. Am I right?
The meaning of line 3 is to tell the machine that the script is executable from the current directory. Right?
And the meaning of lines 2 and 4?
ragdoll is offline   Reply With Quote
Old 01-24-2008, 11:03 AM   #4
tribble
iLiad Maniac
tribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it is
 
tribble's Avatar
 
Posts: 1,382
Karma: 2369
Join Date: Apr 2006
Location: Germany
Device: Bookeen Opus (i love that thing) and iPad (what an irony)
PHP Code:
#!/bin/sh  ### tells the machine where to find the shell
export DISPLAY=:0   ### tells the machine which display to use. i think this is standard environment, when started from contentlister.
export scriptdir=`/usr/bin/dirname $0`  ### this tells the programm, that the scriptdir is the directory, from which the *.sh was started.
cd $scriptdir  ### this changes to the directory.
/etc/init.d/dropbear start 
Why this helps though, i have no idea.
tribble is offline   Reply With Quote
Old 01-28-2008, 06:40 AM   #5
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Did you start your wired connection or wireless connection beforehand?
If not, you should start from "usr/bin/wired.sh" and "/usr/bin/wireless.sh".

I am looking for ways to execute dropbear on memory card, without copying any files to internal memory. Any help is welcome.

Edited:
I solved my problem. A package is uploaded with the "Unbrickable" thread.

Last edited by ericshliao; 01-28-2008 at 10:53 AM.
ericshliao is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
run script on wifi connect sinisterguy Kindle Developer's Corner 1 10-18-2010 03:46 PM
Universal Flasher run script Jamp Sony Reader Dev Corner 1 08-26-2009 09:34 AM
Search Script Gibbo Lounge 7 03-30-2009 04:36 PM


All times are GMT -4. The time now is 12:07 AM.


MobileRead.com is a privately owned, operated and funded community.