LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-22-2005, 02:28 AM   #1
Barca
LQ Newbie
 
Registered: Nov 2004
Location: Poland
Distribution: Slackware - best and only ;]
Posts: 29

Rep: Reputation: 15
Works great, but not from /etc/rc.d/rc.local :(


http://linuxstorm.org/projects/barca/meddler-0.1.tar.gz
If you have compilation problem, add to meddler.cpp this line:
#include <unistd.h>

It's my first program in C++ so don't laugh ;P What he do is written in README file so I won't do mess on this great forum, please read
My problem is that, when runned in daemon mode (meddler -d) Meddler works perfectly. Problem is when I want to add to /etc/rc.d/rc.local (I've Slack 10.0) one line to start my program automatically:

# Meddler
/usr/local/bin/meddler -d

When I restart computer, Meddler is runned, file's are created, but arping isn't launched so packets aren't sending (line 182 in meddler.cpp). Meddler creates file arping.sh, runs it and arping.sh runs arping. I thought that maybe it's too complicated (I said, don't laugh...) and I rewrote the code. Meddler in new version do sth like this:

system(variable_txt);

where variable_txt has value e.x. "arping -c 1 -r -w 2000 192.168.0.142". And the same situation again - runned manually works, runned form rc.local don't.
I tried tricks with paths (e.x. '/usr/local/bin/meddler' in place of 'meddler'), I even added this to rc.S, nothing works. I though that maybe Slackware doesn't permit to run program from another program or what...

Please help

PS Sorry for my english.
 
Old 01-22-2005, 06:31 AM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,535

Rep: Reputation: 119Reputation: 119
What is the path to your variable_txt file ?
 
Old 01-22-2005, 03:14 PM   #3
Barca
LQ Newbie
 
Registered: Nov 2004
Location: Poland
Distribution: Slackware - best and only ;]
Posts: 29

Original Poster
Rep: Reputation: 15
variable_txt is a variable that looks like this:

arping -c 1 -r -w 2000 192.168.0.1

Last part changes from 192.168.0.1 to 192.168.0.254 (a whole network is scanned). I tried sth like that:

/usr/local/bin/arping -c 1 -r -w 2000 192.168.0.1

but it doesn't take any effect
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mplayer 1.0pre6 works great. Try it. teckk Linux - Software 1 12-26-2004 12:22 PM
RHEL 4 beta works great... halo14 Red Hat 2 11-01-2004 06:46 PM
Netscape 7 works great -Just one question? ikw38 Linux - Newbie 4 12-17-2002 06:25 AM
FA311 works great DarkBeethoven Linux - Networking 1 01-18-2002 07:41 PM
rh6.2 router works great but!! gargoyle Linux - Networking 2 09-27-2001 11:53 PM


All times are GMT -5. The time now is 08:54 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration