Koozali.org: home of the SME Server

script in events/local doesnt run

Cyrus Bharda

script in events/local doesnt run
« on: June 05, 2003, 10:08:55 AM »
Hellu,

Well I am very embarassed! I setup a test 5.5u6 box today and installed netprobe, following my instructions to the letter and lo and behold the friggin thing wont start on boot!

So I check my trusty messages log and lo and behold this appears in it:

Jun  6 02:44:13 sme e-smith[1525]: Can't exec "/etc/e-smith/events/local/netprobestart": No such file or directory at /usr/lib/perl5/site_perl/esmith/event.pm line 135.

Jun  6 02:44:13 sme e-smith[1525]: netprobestart=action|Event|local|Action|netprobestart|Start|1054831453 355985|End|1054831453 405364|Elapsed|0.049379|Status|-1

When I check the event.pm line 135 it just contains code to write the log output?

So I rechecked my script and it looks fine:

#!/bin/bash
cd /opt/netprobe-0.4
./netprobe start eth0

when I issue those commands directly it starts fine, just not from the script, when I try running the script manually I get:

[root@sme local]# ./netprobestart
bash: ./netprobestart: bad interpreter: No such file or directory
[root@sme local]#

So I dont know if it is the script or not, I also made sure that the permissions and ownership was 777 and root.admin and re did the whole process all over, from scratch several times, I cannt figure out what I am doing wrong!

Help!

Cyrus Bharda

Kelvin

Re: script in events/local doesnt run
« Reply #1 on: June 05, 2003, 02:25:35 PM »
Hi Cyrus,

I once got this error because I forgot to "reedit" the file under Linux after initially writing it on a Windows PC and copying it into the Linux server.

All I did was, pico the text file, write it out again and voila ! It works.

Just a thought.

Kelvin

Michiel

Re: script in events/local doesnt run
« Reply #2 on: June 05, 2003, 02:39:03 PM »
> that the permissions and ownership was 777 and root.admin and

777 is not a good idea. 750 will do the job and won't open your box to all kinds of nasty security risks.

BTW, Kelvin's explanation sounds probable.

Michiel

Cyrus Bharda

Re: script in events/local doesnt run
« Reply #3 on: June 06, 2003, 02:21:30 AM »
Kelvin,

Thanks will try that!

Michiel,

Yeah I do know about not using 777 but it was just a temperary thing to see if giving it full access would get it to work, thanks though!!

Cyrus Bharda