Sponsored Content
Top Forums Shell Programming and Scripting WLAN receiving DHCP-IP Address doesn't work Post 302820761 by vbe on Thursday 13th of June 2013 11:47:04 AM
Old 06-13-2013
Usually it only knows /usr/bin:/bin ... ( for the PATH that is...)
So setting the PATH so it finds all your commands might be enough...
You dont have any other VAR in your .profile or so that could be used by any of your commands?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

2. Shell Programming and Scripting

How to grep dhcp ip address

Hi, I have a script that my operators use as a login profile. As they need to export their display in order to access the GUI of the data protector program in HPUX machine. Anyone can advise how I can grep (eg. who -r) the dynamically assigned IP address and automatically put it as a variable... (4 Replies)
Discussion started by: chongkls77
4 Replies

3. Solaris

Unix terminal re-assigned with wrong IP address from window's DHCP

Hi all, I have this problem that puzzles me, i have setup all the right DHCP configuration in Windows Server. The reservation IP address in windows for this specific unix terminal. However, when i rebooted the unix terminal the IP which was already assigned for this box somehow change to a total... (0 Replies)
Discussion started by: tlee
0 Replies

4. IP Networking

dhcp configuration for MAC address

hi I need a dhcp congfigured to give some of my clients IP regarding their MAC addresses and rest should get any IP from same pool. I am not sure what to add dhcpd.conf to provide such a pool or group or class. I tried with this but seems not good enough. <<<<dhcpd.conf>>>> ... (2 Replies)
Discussion started by: ouzist
2 Replies

5. UNIX for Advanced & Expert Users

How to get DHCP address change event notification programmatically?

Hello Experts, I am working on a software that has network client-server architecture. I need to have a mechanism that notifies me upon change of dhcp address change locally or at remote machine. Windows have IP Helper APIs to get address change notification. Is there something similar in Unix?... (3 Replies)
Discussion started by: GajendraSharma
3 Replies

6. Debian

Question on the dhcp-server configuration for a fixed IP address.

Hi , when i configure my server with a fixed ip address in dhcpd.conf as below subnet 172.21.151.0 netmask 255.255.255.0 { range 172.21.151.66 172.21.151.66; } host switch { hardware ethernet 00:05:30:02:DB:31; fixed-address 172.21.151.66; } when i start dhcpd server , it... (2 Replies)
Discussion started by: Gopi Krishna P
2 Replies

7. UNIX for Advanced & Expert Users

Doubt on fixed ip address assinged by dhcp server?

we can assign a dynamic and fixed ip address for a dhcp_client through dhcp server , if it is dynamic ip address , it would be having lease time and renews after half of the leasetime gets over. would the same funda applies for fixed ip address to .. i dont think so ... please confirm on the... (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies

8. Red Hat

DHCP Server address

Where can you find your DHCP Server address? I checked all of the files that this mentioned with no luck. Quick HOWTO : Ch08 : Configuring the DHCP Server - Linux Home Networking (6 Replies)
Discussion started by: cokedude
6 Replies

9. Red Hat

Purpose of Static IP address through DHCP

Hi All, Could you please explain the purpose of assigning the static IP by using the DHCP Concept. Like by using the clients MAC address we assign the static IP Address. Waiting for your reply. Thanks in Advance. (6 Replies)
Discussion started by: Sharath Kumar
6 Replies

10. IP Networking

Get DHCP relay interfaces IP address using DHCP

Hi All , please view the set up below: ------------------------------------------------------------------- | DHCP Server |-----------| ROUTER & |-----------| Clients | | 192.168.99.1 | - -<eth1>| DHCP-RELAY|<eth2>-- | 192.168.88.X | ... (2 Replies)
Discussion started by: gdangoor
2 Replies
detect.conf(5)							File Formats Manual						    detect.conf(5)

NAME
detect.conf -- provides the configuration for detection of locations for whereami. DESCRIPTION
Syntax The detect.conf file specifies the tests that allow whereami to figure out where it is. The environment of such tests can be manipulated using the 'set' command. Tests can be performed conditionally upon the results of other tests using "if ... fi" constructs. Comments are lines starting with the `#' character. Leading whitespace is ignored on all lines, including comment lines. Internal Commands The syntax of this file is fairly straightforward. Tests are specified thus: testname parameter locations The command testname is run with the single parameter (which may be split internally). If the return value is 0, the test is considered `successful' and the locations are considered `discovered'. locations is a list of comma separated identifiers, each one matching the regexp ``[[:alnum:]._-]+''. On success, processing will skip all non-`always' statements up to the next `if' or `fi' keyword, whichever is earlier. if location statements ... [elif location statements ...]... [else statements ...] fi If the location is in the list of locations discovered so far, then the statements in the `if' branch will be processed. Other- wise, if present, the statements in either the `elif' or the `else' (as appropriate) branch will be processed. Note that nesting of `if' blocks is not supported at this time. always testname parameter locations A test preceded by the word `always' is not skipped unless it is within the inactive branch of an `if' clause. set variable value The environment variable is defined as value for all subsequent test scripts and in the shell script eventually constructed by whereami. at locations The locations will be added to the "discovered" list. notat locations The locations will be removed from the "discovered" list. echo quoted text string The "quoted text string" will be displayed to the user on stdout. The parameter and locations may be lists, with a comma (",") used to separate multiple values. Tests Any program may be used as a test so long as it accepts a single parameter and returns zero on success and non-zero on failure. If a parameter of the test script must contain a space, it parameter will need to be quoted. A number of tests are included in the whereami package. testdhcp [interface,]pattern Tests for the assignment by DHCP of an IP address matching the specified address pattern. If not specified, the interface defaults to `eth0'. Note that the first execution of this test during a particular run of whereami induces a DHCP request on the specified interface. testmii interface Checks for the presence of a link on interface using the mii-tool utility. If a link is not found then the interface will be 'down'ed to limit side-effects on other detection later. testpppoe interface Tries to start a PPPoE connection on the specified interface. Success is returned if the connection starts. testarp interface,mac_address,ip_address Performs an arping (Debian package: iputils-arping) to look for the specified mac_address and ip_address combination on the net- work connected to interface. testping [interface,]ip_to_ping,ip_to_use Uses the fping program to perform a fast ping to look for the presence of a particular host on the local network. testpci pattern Searches for the pattern in the output of lspci -v. This enables checking for specific hardware, such as a particular type of docking station. testmodule pattern Searches for the pattern in the output of lsmod. This is useful for checking for the presence of a particular PCMCIA card, or possibly a particular kernel configuration. testap [interface,]scan testap pattern[,WEP Key] testap [interface,]pattern,WEP Key The pattern is a regexp (egrep regexp) used to match AP essids: when this regexp matches a detected essid the test is considered succesfull. This check does not require encryption to be set up to work, although it may not find stealthier equipment - use testssid in that case. The 'scan' option will cause a new scan, and the first call should have this option set. Subsequent calls will use the results of that first scan, reducing the overhead for those busy people who connect to many WLANs! If a WEP key is supplied, and a pattern match is found, the key will be assigned to that interface so that subsequent tests should work correctly. When using the WEP key you may in some cases desire to pass additional parameters to iwconfig. These parameters may be passed preceding the WEP key and separated with an underscore. For example "restricted_0123-4567-89" will force the card to be config- ured to insist on 'restricted' mode at the same time as the key was set. testappassive [interface,]scan testappassive pattern testap [interface,]pattern Checks whether the specified AP is present, passively. This check does not alter the essid on the interface, or set the WEP key like the testap test. It just uses iwlist interface scan. This is useful where you have another external script that sets up all the wifi settings, and running whereami a second time destroys the running wifi connection, as can happen on boot where net- working is intialised before whereami starting in run level 2. The 'scan' option will cause a new scan, and the first call should have this option set. Subsequent calls will use the results of that first scan, reducing the overhead for those busy people who connect to many WLANs! testprocsys proc-or-sys-path,egrep-pattern Checks the specified /sys or /proc file to see if it contains the given egrep expression. Non-existent file results in failure, as well as a failed match. Useful for those interfaces that require to hotplug to be configured so that firmware can be loaded. On machine shutdown, hotplug can be disabled before networking interfaces, and this enables whereami to function correctly in those circumstances. testssid ssid[,key] Checks whether the wireless interface is in range of the specified ssid, using the key if supplied. The key should be formatted as for iwconfig. What works for me looks like da18babe100ea4beadb74324bc ("128" bits) or fe3d1b3ed7 (40 bits). This script will also respond to a TIMEOUT variable which is set before it is called, but waiting for $TIMEOUT seconds for the network to settle (default 2). This is useful for checking which wireless LAN is in range. testreceived [interface] Checks whether the interface in question has received any bytes. This is useful for checking which network interface is actually connected to a network. EXAMPLES
The following examples show simple setups, firstly for a wired only configuration, and secondly for a mixed wireless and wired setup. A Simple Wired DHCP Configuration # Simple wired DHCP with two networks default undocked testmii eth0 lan if lan set INTERFACE eth0 testdhcp restart dhcp fi if dhcp testdhcp '192.168.1.1' home testdhcp '152.81.*.*' univ fi A Wired and Wireless Configuration # Configuration including both wired and wireless networks default undocked testmii eth0 lan # We prefer a wired network, but if we aren't wired # we will look for a WLAN. if lan set INTERFACE eth0 testdhcp restart dhcp else set INTERFACE wlan0 testap scan wlan fi # Try WLANs until it we find one that works if wlan testap homessid,dead-beef-dead-beef-dead-beef-be wlhome_enc testap homessid wlhome_open fi # If we are at a WLAN we should have the AP setup now if wlan # WLAN almost always will be DHCP testdhcp restart dhcp fi # Now identify the actual network if dhcp testdhcp '192.168.1.1' home testdhcp '192.168.1.2' wlhomeip testdhcp '152.81.*.*' work fi SEE ALSO
whereami(8), whereami.conf(5) Further documentation is available in the /usr/share/doc/whereami directory. FILES
/etc/whereami/detect.conf The file we are talking about in this here manpage. /etc/whereami/whereami.conf Defines the actions performed as a result of entering, leaving, or remaining at a particular location. LIMITATIONS
The `if' syntax does not support nesting. AUTHOR
This manual page was written by Andrew McMillan <awm@debian.org> for the Debian GNU/Linux system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GPL version 2. detect.conf(5)
All times are GMT -4. The time now is 11:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy