Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 04-24-2012, 01:14 PM   #16
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by cscat View Post
What I want is to run my custom scripts with bash instead of busybox... What should I do for this? just make a symbolic link from this bash to /bin/bash (which already exists and is a symbolic link to busybox)?

Edit: I did the above thing and then ran this code just to check I'm actually using bash not busybox.

test.sh
Code:
#!/bin/bash
history
but no luck!
Just point your custom scripts at YOUR bash:
#!/mnt/us/bin/bash

Or feed them to bash:
/mnt/us/bin/bash myscript.sh

That way they will run in bash even if you launch them from a busybox shell (no need to start a bash shell).


Last edited by geekmaster; 04-24-2012 at 01:23 PM.
geekmaster is offline   Reply With Quote
Old 04-24-2012, 01:31 PM   #17
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
And by all means, restore the original /bin/bash symlink. The /mnt/us is not necessarily up and running from reboot on (but the root file system should be), so you have a symlink pointing to nowhere at boot, breaking all system scripts that use /bin/bash.

If I am not mistaken, the easiest approach is to use "#!/usr/bin/env bash" and set an appropriate PATH. That will leave scripts compatible on many platforms.
hawhill is offline   Reply With Quote
Old 04-24-2012, 04:15 PM   #18
thatworkshop
hub
thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.
 
thatworkshop's Avatar
 
Posts: 715
Karma: 2151032
Join Date: Jan 2012
Location: Iranian in Canada
Device: K3G, DXG, Kobo mini
Quote:
Originally Posted by hawhill View Post
And by all means, restore the original /bin/bash symlink. The /mnt/us is not necessarily up and running from reboot on (but the root file system should be), so you have a symlink pointing to nowhere at boot, breaking all system scripts that use /bin/bash.
Thanks hawhill. You taught me something today. And obviously thanks geekmaster.

Quote:
Originally Posted by hawhill View Post
If I am not mistaken, the easiest approach is to use "#!/usr/bin/env bash" and set an appropriate PATH. That will leave scripts compatible on many platforms.
Well if I want to change my PATH, I'd suppose I have to add the path at the beginning, eg. like this:
Code:
/mnt/us/bin:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/sbin
And by doing this, at boot time bash will kick in instead of busybox. And your proposed problem will still exist. Am I wrong?

EDIT: I'm asking because I don't want to do any harm to my only Kindle again.

Last edited by thatworkshop; 04-24-2012 at 04:27 PM.
thatworkshop is offline   Reply With Quote
Old 04-24-2012, 04:26 PM   #19
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Oh, I was suggesting to set the PATH only for the terminals you use. I think someone else who can actually tell how things are organized on a KTouch could go into details and e.g. explain how to set session settings.

And it's in fact a bit different situation as for consequences for the boot sequence: Non-existing paths are ignored. Bash won't kick in, however, since other scripts will probably use absolute path (#!/bin/bash) instead of that "env" trick (which will search the PATH for the named executable).
hawhill is offline   Reply With Quote
Reply

Tags
bash

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash-Skript für Pocketbook Reader schreiben Hildegunst PocketBook 18 05-02-2011 05:25 PM
Bash Script/SQL Query for ISBN in filename? zenrhino Calibre 1 09-26-2010 08:55 AM
Is it possible to execute a bash script from the SD card? godel10 iRex 25 06-25-2009 03:55 PM
manga2pdf - Linux bash scripts for the Cybook, Sony Reader and iLiad IceHand PDF 52 03-09-2009 06:36 PM
BASH script for *2lrf utilities (thanks Kovid!)... KaiGoth Sony Reader 0 08-05-2007 01:30 AM


All times are GMT -4. The time now is 07:05 PM.


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