View Single Post
Old 05-04-2007, 10:54 AM   #1
jharker
Developer
jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.
 
Posts: 345
Karma: 3473
Join Date: Apr 2007
Location: Brooklyn, NY, USA
Device: iRex iLiad v1, Blackberry Tour, Kindle DX, iPad.
"Extra"-Unbrickable -- A supplement

I really like hudson's "Unbrickable" mod, which starts the dropbear ssh server on iLiad boot and allows access even if the GUI doesn't work. In addition to that, I felt I needed a little extra unbrick insurance for development work, and I came up with this.

I put the original start.sh in /home/root/.start/start.sh, and put a testing start script in /home/root/.start/testing.sh. Then, I wrote a new start script in /home/root/start.sh that looks like this:
Code:
#!/bin/sh
if [ ! -e /home/root/.start/flagBootTesting ]
then
    . /home/root/.start/start.sh
else
    rm /home/root/.start/flagBootTesting 
    . /home/root/.start/testing.sh
fi
You can see how this works: if you want to run the testing script, do "touch /home/root/.start/flagBootTesting" to create the flag file. Then when you reboot, the flag file will be deleted FIRST, and THEN the testing start script will be run. If there's anything wrong with the testing script, simply reboot the iLiad. The flag file will be gone, and the iLiad will boot using the standard startup script.

If you look at testing.sh, you'll note that it runs the new executable Xfbdev.test, while start.sh still runs the original executable Xfbdev. I should probably have put Xfbdev.test in another directory, like /mnt/free/test or something. Obviously the point is to minimize changes to the original system.

For obvious reasons, I recommend
  1. Very first thing, make an untouched, pristine backup of the original (iRex-provided) start.sh somewhere.
  2. BEFORE you run any iDS updates, replace ~/start.sh with the original, iRex-provided start.sh.
If, like me, you're playing with the xserver, and if, like me, you're really paranoid that your modifications might crash or freeze up the iLiad entirely, preventing ssh access, you might consider this little script hack. This should also be helpful when trying any changes to the startup script. Simply make testing.sh your "dangerous" script, and leave start.sh as the default "known good" script. I hope this is helpful!

(Cross-posted to iRex Forums)

This attachment could be unzipped directly into /home/root on your iLiad, but you should probably just look at the contents and do it by hand.
Attached Files
File Type: gz starts.tar.gz (1.2 KB, 656 views)

Last edited by jharker; 05-04-2007 at 11:27 AM. Reason: Added link to hudson's Unbrickable mod, added statement of usefulness; mild editing for readability.
jharker is offline   Reply With Quote