up2date can only be run by root.
/bin/sh should be fine
the permissions should be :
-rwxr--r-- root ...... script
or
-rwx------ root ...... script
Scripts not only nead to be executable by the user running them, but they also nead to be readable.
If the executable is not in one of the directories listed by :
echo $PATH
you must run the script prepended by a path, like this :
/path/to/script
or if it is in your current directory
./script
You do NOT need '.sh' or '.exe', this is done automagicly using mime-magic.
To check what kind of file a file is, you can run :
file samplefile
The file command will tell you what kind of file it thinks samplefile is.
example :
[kermit@xxxxxxxx]$ file bin/rhn_update bin/rhn_update: Bourne shell script text executable
The first line contains the shell the program wil run in.
If you wnat it to run with bash, put :
#!/path/to/bash
Where /path/to/ is the path to your bash command, which can be found by typing :
which bash
I hope this clears up your confusion.
shane c branch wrote:
Msquared wrote:
On Thu, Dec 04, 2003 at 01:27:23PM +0800, Ow Mun Heng wrote:that crossed my mind as well. i tried it with #!/bin/bash and got the same error.
i'm stil having trouble. i made it exe by root, and dropped it in /bin. but when i try to run it i get this error:
bad interpreter. no such file or directory
You're kidding right? exe? Or do you just mean executable by root?
you did chmod u+x scriptname.sh right??
The bad interpreter error could be related to the first line of the script, which (I think) reads:
#!/bin/sh
Perhaps change it to
#!/bin/bash
Regards, Msquared...
i double checked the permissions by doing #chmod u+x scriptname.sh
then tried to run it, but again got the error.
-- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list