General :: Executing A Script When DHCPD Give An IP?
Nov 16, 2010
i want to do a setting to dynamically monitor my Work Station on my Wifi network.
I've got my name server BIND and my dhcpd server all of that under linux working perfectly. But i didn't find any option to execute a script when dhcp give an IP to a machine. I would like to know if there is a way to do that. If there is no options for that i'll use the log files.
View 1 Replies
ADVERTISEMENT
Jun 20, 2011
I've found a lot of pages of how to fix the issue on older releases of dhcpd and ubuntu.
#>dhcpd
#> ...
#> Can't create PID file /var/run/dhcpd.pid: Permission denied.
I have tried creating the file and giving it permissions to be accessed, but that isn't solving the issue. I tried to go through some of the older fixes, and one was really close to working but lacked the same folders as I have.
EDIT: one solution that worked was to use ln -s /var/run/dhcp3-server/dhcpd.pid /var/run/dhcpd.pid dhcpd3 -cf /etc/dhcp3/dhcpd.conf at0
View 1 Replies
View Related
Nov 24, 2010
Im trying to setup dhcpd to put certain systems witch have mac address starting with 08:00:* in a certain ip class. How can this be done?So any system with mac address starting with 08:00 to get an ip from this range 192.168.12.2-192.168.12.99.
View 11 Replies
View Related
Mar 14, 2010
My dhcpd service get failed every time when I try to start it
1) Actually I have a lan connection which has a static ip network 192.168.10.0/24 and the pc to which is using the dhcpd has a ip address 192.168.10.1/24
2) And I have a internet connection wirelessly which has a network 192.168.2.0/24
Now I want to problem ip address in the network of 192.168.10.0/24
Here below is the configuration file of dhcp server:
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
# Use this to enble / disable dynamic dns updates globally.
#ddns-update-style none; .....
View 3 Replies
View Related
Aug 24, 2010
# /etc/init.d/dhcpd.conf -bash: /etc/init.d/dhcpd.conf: No such file or directory what is the problem? and how to configure out "joe"
View 5 Replies
View Related
Jan 14, 2010
My present working is
Code:
linux:/home/anisha/downloads/mapnik-0.6.1/demo/c++ #
Now I want to run "python scons/scons.py" located in
Code:
linux:/home/anisha/downloads/mapnik-0.6.1/ #
I tried
Code:
../../python scons/scons.py
From the above stated PWD but it resulted in the following:
Code:
bash: ../../python: No such file or directory
What is the way to execute a file of some other directory from the PWD!
View 14 Replies
View Related
Jun 16, 2011
Running following script for checking root ssh login status.
Code:
Flag=`cat /etc/ssh/sshd_config | grep "^PermitRootLogin"`
if [ -z "$Flag" ]
then
[Code].....
View 1 Replies
View Related
Aug 13, 2010
I have a USB modem on a Debian install that I want to be able to use AT commands to diagnose, specifically for obtaining signal strength (RSSI). I know the command for this is AT+CSQ but I cannot seem to get the interface for issuing AT commands to work.
The modem is using /dev/ttyACM0 and when I try to use minicom, I type in AT commands and nothing is echoed to the screen (Yes, echo is turned on). Maybe I just don't know how to use minicom correctly.
View 9 Replies
View Related
Jul 15, 2010
Code:
#!/usr/bin/awk -f
BEGIN{ FS=":"}
{
"groups "$1 | getline grps
[code]....
View 5 Replies
View Related
Aug 6, 2010
I have a some c source code files that i have to copy to linux machine from a windows machine over a network. This source code folder has to be copied into a particular directory structure in the linux system at the other end. After copying the file into the appropriate folder in the linux server i have to instruct the linux machine to make(using the make file that is there with the c files) this source code from the windows machine. Does anyone have any idea in regard to how this can be implemented?? i am trying to have a gui client that has the above mentioned options(copying and inserting the c files into the appropriate directory and then for making the files and getting the executable.)
View 3 Replies
View Related
Dec 17, 2010
I tried to execute a shell command by M-! cmd RET but it did not work.M-! does not turn up in the microbuffer no matter how many times I press Alt+!.But if I go to Tools menu and select Shell Command... option then it writes M-! to the microbuffer and everything works fine.What is the problem here?
View 2 Replies
View Related
Jun 15, 2011
I am running to a weird issue: for some reason when I try to run a crontab script which has these two operations:
#!/bin/sh
DATE=`date +%F`
but when I reduce this script to the first sql backup only and I use another cron job to put this dump file to the folder it goes through...weird isn't it?so 1+2 in 1 cronjob don't work but 1 in 1 cronjob and 2 in another cronjob it works perfect. any thoughts?
View 3 Replies
View Related
Jan 13, 2011
I have procmail parsing the subject line of incoming e-mail and depositing individual files in a folder that match the procmail recipe.I want to have that recipe spawn a perl script to parse the file to pull out specific information. I've googled this and found many examples but none of them work.When it finds a matching inbound message it logs it correctly in the charge.log file, writes the message in charges/new/xxx but skips the /home/rowan/billing.pl script.
View 2 Replies
View Related
Sep 17, 2010
I got segmentation fault error when I execute "procinfo -a" but not a problem when I just execute procinfo.
View 3 Replies
View Related
May 16, 2011
I want login.sh shell script executing automaticaly whenever i open the console..?and also logout.sh shell script executing automaticaly whenever close the console.
View 1 Replies
View Related
May 27, 2011
I'm trying to run an application from the command prompt. I've set the path in .bashrc. My executable file and all other files needed by it are saved in the same directory as the path. When I enter the executable name to run it, I get an error message saying that the command is not found.
View 14 Replies
View Related
Dec 21, 2010
i have recently started a bit of sh coding. i was trying out sm commands from an sh file.
#!/bin/bash
txt1="top > temp.txt"
eval $txt1
[code]....
View 14 Replies
View Related
Apr 13, 2010
i just want to know whether we can execute the commands in invisible mode in linux. i.e.the command we typed must be executed but should not be visible.is it possible.
if not,then how the password we are typing is not visible in linux,while creating or entering password for users.
View 12 Replies
View Related
Jul 8, 2010
For routine tasks i have to execute commands on machines running both winxp and linux. I usually do it via telnet. But the process is very manual as i have to authenticate for each machine then specify the command.
Is there any way that i could automate this job using a script or so?
View 10 Replies
View Related
Nov 22, 2010
i have n files and each file has 5-6 .sql files.Now I need to wrie a shell script that executes all the n files in parellel and for each n file the .sql files sequentially.eg
CRM_File CM_file AP_file
crm_file_1425.sql
cm_file_5789.sql
ap_file_4124.sql
[code]....
run CRM_File CM_file AP_file in parellel and each file under CRM_File,CM_file,AP_file sequentially.
View 6 Replies
View Related
Jun 30, 2010
I am running Yellow Dog Linux release 6.2(Pyxis) on my PS3. I would like to compile and run C programs that utilize OpenMP for parallel programming. Unfortunately, I have not been very successful. I am able to compile programs containing OpenMP statements error free, but when I attempt to execute the binaries I receive the following error: Code: ./file: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory Compiling programs without OpenMP statements works fine.
Because it has to do something with missing libraries, I am not sure if knowing the executable search paths may help in diagnosis, but when echoing the path environment variable:
[Code]...
The version of GCC on this machine, 4.1.2 20080704 (Red Hat 4.1.2-44), is identical to the ones I have on two other machines (CentOS release 5.3 (Final) and CentOS release 5.4 (Final)) and they both compile and execute OpenMP code flawlessly. I have tried building and installing another version of GCC that would possibly include the OpenMP libraries, since, according to some sources, GCC has only supported OpenMP since version 4.2. But I have not been successful with that either (that problem would make a good second thread.)
View 3 Replies
View Related
Jul 1, 2011
In my code I want to have two different functions to be executed simultaneously (in parallel) in a single processor system. I tried to use pthreads but they happened to be executed one after another. I have heard about fork, some saying that its no longer recommended since its functions can be achieved by pthreads.
View 1 Replies
View Related
Feb 17, 2010
How do I let user Y write in folder A only when executing script X?
View 3 Replies
View Related
Aug 20, 2010
I have the following command:ssh $USER@$HOST "ls /ops/pkg/ec/`grep "PKRTS" /ops/pkg/ec | awk '{print $1}'`* > /tmp/tmp_file"What the above SHOULD do..is, ssh to the host then execute the command.The command should first execute the grep and awk between the back ticks, and generate a file name, then ls using that filename* and write that data to a temp file.However, it executes the grep and awk before even SSH'ing and the command that goes to the server is simply an "ls /ops/pkg/ec/* > /tmp/tmp_file" since the grep and awk return nothing on the local machine.
View 1 Replies
View Related
Jun 29, 2011
I'm using Ubuntu and I'm programing with eclipse CDT. My goal is to execute a php file and read the output to my c++ program. To do so I thought I should use fork(), dup2() and execl. When in shell, the call "php myscript.php" worked just fine, but when in c++ I tried:
execl("usr/bin/php", "php", "home/geiger/workspace/SemiServer/server_content/myscript.php", NULL);
And it didn't work (the process wasn't terminated and I got no output). I tried different version of this call, like losing the "php" string and/or drop "home/geiger" from the path string, to no better result.
View 1 Replies
View Related
Jul 14, 2010
I am writing a script which will fetch data from different machines and display it on single terminal. I have created a file named SERVERNAMES containing ip address of machines I need to monitor. Then for every IP I am issuing ssh command to get date on that machine. However When I am trying it on the script it is just giving me output of first server and it is ignoring rest servers mentioned in file. ssh works fine without password for all machines mentioned in SERVERNAMES.
Code:
# cat SERVERNAMES
10.180.45.231
10.180.45.235
10.180.45.238
10.180.45.211
Script
Code:
#!/bin/bash
while read line
do
#Calculate Load on remote machine.
Date=`ssh -T -q $line date`
echo "Date on $line is:$Date"
done < SERVERNAMES
Code:
output.
Date on 10.180.8.231 is:Wed Jul 14 10:48:46 IST 2010
I am not getting the output for .
Code:
10.180.45.235
10.180.45.238
10.180.45.211
Is there anything wrong in ssh?
View 5 Replies
View Related
Jul 30, 2011
I want to execute a awk command, which reads from txt files and sums the numbers from the first column for those listed only inside a <init> block -- The awk command is like
Code:
awk '/</?init>/{x = !x}x{a++}x && a > 2{sum+=$1}END{printf"%E" "
", sum}
So, I want to execute it inside a perl script, and execute the awk command for the infile which is also defined outside awk loop, ie doing something like
Code:
foreach $infile (@ARGV) {
$gzin = gzopen($infile, "r") || die ("Couldn't open file $infile
");
# No. events and cross-section from current file
[code]....
View 1 Replies
View Related
Sep 14, 2010
i'd like to execute in several subdirectories that all have the same name, but I don't want to have to change into each subdirectory (there are hundreds) to execute the script. All the subdirectories have the same name ("final_alignments"), but are located in parent directories with different names. All these parent directories are in the same "super parent" directory. I've tried to do this using "for/do" and "find" but no luck so far.
View 8 Replies
View Related
Apr 22, 2010
I have this scenario, where in I'm calling a shell script inside another shell script. The only criteria here is that the embedded script will have 654 permissions and the master script should be able to execute this embedded script. The sample code is given below:
#!/usr/bin/ksh
maindir=/usr/home01/temp/dir
bindir=${maindir}/batch/bin
${bindir}/test.ksh -d ${dblogin} -i ${datadir} -r ${filedt} > ${tmp_log}
The test.ksh which has 654 permissions is called by the main.ksh script and when I try to run it using ./main.ksh, it fails with the error "Execute permissions denied."
View 2 Replies
View Related
Jan 5, 2011
I am out of ideas of how to run videos at a remote machine that has a display. I have a debian system with gnome installed and everything is set up but I just don't now how to start the video over anything. I have tried simply to start #vlc video file - but this way it thinks that I want to run it in my bash over at a nother computer. I tried installing vnc but this just ports a new desktop and masically is a terminal which does not give me any control over the display.
View 7 Replies
View Related