Tiny Core Base > TCB Q&A Forum

sh: file not found error for script in usb persistent opt directory

(1/3) > >>

bigpcman:
I've created a persistent opt directory in sda1 using the boot option opt=sda1. All that worked fine. I then copied over to the opt directory my web server lampp directory. I then tried to run the lamp apache startup script but get sh: lampp file not found error message. I've checked the simple things like permissions and ownership as well as the file structure (ext2). All seems ok. I've looked in the fstab file and sda1 is loaded correctly. I've run stat on the lampp file script and it seems fine. Any ideas?

curaga:
Is the directory in PATH? Where are you trying to run it from, and are you trying to run it with full path or just the name?

bigpcman:
I cd'ed to the directory the command is in and ran the command from there. Actually I tried it several ways, ./name and name. By the way this all works in DSL 4.4. I renamed the opt directory for DSL to Opt_dsl to get it out of the way and then booted into tc and created a new opt. After sudo su in Aterm, I copied the opt directory from tc (cp -af opt mnt/sda1 ) to sda1 and then copied the lampp directory (cp -af mnt/sda1/opt_dsl/lampp mnt/sda1/opt) to the new opt directory. I then rebooted with the opt=sda1 option. Very curious that the lampp command is not found.

roberts:
sh not found is usually the result of a script calling bash via  she-bang
TC does not use bash but the ash shell
Change the she-bang to #!/bin/sh
or load the extension that will provide the necessary shell.

bigpcman:
Thanks for the reply Robert. The script uses #!/bin/bash so I assume I need to load the bash shell. Since I only need one shell how would I remove the ash shell and make this persistent. Is remastering required?

Navigation

[0] Message Index

[#] Next page

Go to full version