Ubuntu :: How To Detect When EthX Interface Is Down From A Bash Script

Jun 11, 2011

I'm trying to write a small script and there's one part of it that makes me sick:

Code:

ifconfig eth$num down
sleep 6
ifconfig eth$num hw ether $mac
ifconfig eth$num up

The problem is that the ethX interface doesn't go down immediately after the first line is executed. So sometimes the change of MAC is called while ethX is up, no matter how big is the sleep time, which results in an error. Is there a way to make this work right?

View 1 Replies


ADVERTISEMENT

General :: Detect FireWire Interface And Connected Device On It, In Ubuntu 11.04?

Sep 6, 2011

I have a FireWire camera LifeSize connected to my PC in the FireWire interface. My PC has miniPCI slot and with external converter its having a FireWire interface. Now its Ubuntu who is not showing me anything at all when i try:

$ uname -a
Linux desktop 2.6.38-11-generic-pae #48-Ubuntu SMP Fri Jul 29 20:51:21 UTC 2011 i686 i686 i386 GNU/Linux

[code]....

View 1 Replies View Related

Fedora :: Ettercap Unable To Detect Any Interface

Aug 3, 2010

I am using fedora 13 and have installed ettercap from Add/Remove Software in Fedora. But when it is starting(Application->Internet->ettercap), it is not able to detect any interfaces ( i am using eth0 interface, wired lan ).

View 4 Replies View Related

Programming :: Detect Which Module/driver A Network Interface Use?

Dec 28, 2010

In C++ or C, is there anyway to detect the name of the module or driver currently used by a network interface card (either wired or wireless, INCLUDING USB DEVICES)?My application must have this feature. I just want to detect whether the module / driver is ndiswrapper or not.

View 4 Replies View Related

General :: Finding A Tool That Will Detect Whether Having A SATA Or A PATA Hard Drive Interface?

May 18, 2010

Is there a tool for Ubuntu that will detect whether I have a SATA or a PATA hard drive interface, even if there's no hard drive inserted?

View 3 Replies View Related

Ubuntu :: 10.10 - Cannot Detect Subdirectory (Bash CD Error)

Dec 21, 2010

I'm trying to change to a subdirectory:
Code:
tony@advent:~/scratch$ cd Home-Arch
bash: cd: Home-Arch: No such file or directory

So I list the contents of the current directory:
Code:
tony@advent:~/scratch$ ls
duhome Home-Arch qcad_1.dxf qcad_1.svg runme stdout

OK, I assume I have mis-typed the subdirectory name in ways I cannot detect, so I copy the sub-directory name from the output of the 'ls' command, while within the terminal window, and paste it into the next 'cd' command:

Code:
tony@advent:~/scratch$ cd Home-Arch
bash: cd: Home-Arch: No such file or directory

I browse the directory and sub-directory in Nautlius - everything is there where I expect it to be. The folders/files are not hidden. What is happening here?

View 8 Replies View Related

General :: Bash - Detect When A Terminal Gets Focus?

Jun 23, 2011

I want to be able to time how long I spend in front of a terminal. I'm thinking the best way will be to have some sort of timer that starts and stops when the terminal gains/loses focus. And it will have to work with multiple terminals...

I'm using GNOME.

View 3 Replies View Related

Programming :: Bash If *sometimes* Fails To Detect Embedded Newline

May 21, 2011

Using xsel I pass a selection into a variable. I then check that the variable includes an embedded newline to be sure that the selection returned by xsel is complete. If the selection content preceding the newline is just a single word, the check fails to detect the newline, thus

Code:

g fnm=`xsel`
g cat <<< "$fnm"
Whatis
apropos sear

[code]....

View 14 Replies View Related

CentOS 5 :: Install Graphics Interface From Bash

May 18, 2009

I want to install a lineage 2 server on a vps... I have bought it and I have receiver connection details with ssh -.- . It's possible to install graphics interface from bash line because I don't know to set up a l2 server from bash line...

View 9 Replies View Related

General :: Use For A Web Interface That Runs Bash Scripts In Bckgrnd?

Jun 7, 2010

I have a set of bash scripts which I need to execute through a web-interface. So that they can be executed remotely, once the web-interface is hosted on a server. Since this is the first time I am trying something like this, I am not sure what language or technology to use for such work. From my knowledge PHP could be a good fit. But not really sure.

View 1 Replies View Related

Programming :: After USB Boot - Detect Which Device The Ramfs Was Loaded From - Bash Or Python

Sep 22, 2010

How one could determine (for use in a Bash or Python script) which device (eg /dev/sda1, /dev/hda1... etc) a ramfs was loaded from when booting from a USB drive.

I have a RIPLinux/Tinycore live USB disk that automatically needs to run a script that is stored on the same USB drive but not part of the RIPLinux/Tinycore image. (Please note that I do not want to put this script into the RIPLinux image.) I therefore would like to remix the RIPLinux/Tinycore ISO to automatically run this script once it has started up. After RIP linux has booted I would like to automatically mount the USB drive that RIPLinux/Tinycore was booted from. I need help detecting which device this is.

View 3 Replies View Related

General :: Using Ifconfig Without Using 'ethX'

Jul 1, 2010

I'm a relatively inexperienced with Linux, coming from a Windows background, and I struggling to solve a troublesome issue attempting to set a static ip address to a Live Debian USB Key. I know it is possible to utilise the 'ifconfig' function to set a static ip address and use 'route' to set the gateway, e.g.

ifconfig eth0 10.0.0.40 up
route add default gw 10.0.0.130 eth0

..however in both cases I need to explicitly set the 'eth0' to point at the appropriate adapter. However, this is where my problem is...

I'm creating a persistent USB key using the Debian Live CD, I'm going to create an image and then duplicate that image to a load of other USB keys. Again, not a problem as such but there are cases where I need to specify a static IP address and gateway rather than using DCHP.

And here's where problem raises its head.

Because I've created the key on another machine it has allocated 'eth0' to a specific MAC Address (assigned in /etc/udev/70-persistent-net.rules) but when I place it into machine with a different network adapter it is assigning to 'eth1' (and this increments up).

a) call 'ifconfig' and 'route' without having to identify the adapter or

b) change the script that is creating '/etc/udev/70-persistent-net.rules' so it overwrites the 'eth0' entry with the only applicavle network adapter for the current hardware.

View 4 Replies View Related

Ubuntu Networking :: What's Relationship Between Ethx And Physical Net Cards

Apr 8, 2011

Do you know what's relationship between ethx and physical net cards? such as i have three net cards in the PC, named A, B, C. In which config file i could know that eth0 -> A, eth1 -> B, and eth2 -> C. Would the mapping relationship change after reboot? Is there any method i could change the mapping?

View 5 Replies View Related

General :: Sys/class/net/ethx/type - What Is It?

May 3, 2011

To get info of all etherhet adapters I am using C as well as info from various files in /sys/class/net/ethx directory.

There is a file name 'type' and has a number in it. Is it physical medium type of ethernet adapter? If yes, then how do I get string representation of that number? If no, then How do I determine physical medium type of ethernet adapter. For example 802.3, 802.5 etc.

View 1 Replies View Related

OpenSUSE Network :: Every Boot Requires New Ethx Config

Feb 27, 2010

new Install of 11.2 every time i boot i have to config network devices via Yast Control Center. I now have 8 eth configs for my one local net adapter. Why does the MAC address change each time? I cant use my routers built in MAC filter and MAC control functions if this keeps changing. So each time i boot i need to also go into my router and build a new MAC address profile based on the new MAC address before i get Internet access. Security to the point of no access...I hope this is just a bug in the system. I thought MAC addresses were firmware/device specific? What I need is one eth config that works each boot. And I need one MAC address that does not change between boots.

View 4 Replies View Related

Red Hat / Fedora :: Distro Randomly Assigning Nic To Different Ethx After Each Reboot

May 22, 2010

how are nics assigned - eth0 - ethx I am having problem with my distro randomly assigning nic to different ethx after each reboot. Sometimes nice 1 is eth0 and sometimes is eth3.

View 4 Replies View Related

Red Hat :: Prevent Kudzu From Changing Ifcfg-ethX File?

Aug 31, 2010

Running Centos 5.5 64bit. Sometimes I boot this instalation in real machine, sometimas using vmware workstation. The problem is that these environments have different network interface cards - as soon as kudzu detects that network device changed it renames ifcfg-eth0 to ifcfg-eth0.bak and places new default ifcfg-eth0.

Is it possible to command kudzu to leave ifcfg-eth0 as it is ?

View 2 Replies View Related

Slackware :: UDev Playing Hide And Seek With EthX Device

Feb 24, 2010

Some times I boot up, and udev has labelled what is usually eth0 as eth1. Of course, my rc.inet1.conf is configured for seeing internet at eth0, so no connection, quite obviously. Then I reboot and the device label is back to "eth0". Actually I'm still not able to get connected, even at eth0, despite my nameservers being OK, and the default route gateway being all OK. PS. I have a static ip address.

View 3 Replies View Related

Red Hat / Fedora :: RHEL 5 Dual Networking - Ethx (0,1) Devices Are Brought Up Be Changed At Boot Time

Jun 3, 2010

I'm having an issue with dual networking on RHEL 5. My initial question is can the order the ethx (0,1) devices are brought up be changed at boot time, so I could bring up eth1 before eth0?

Some background: eth0 is DHCP'd and using DNS, basically this is my primary network. eth1 is an isolated subnet, with a manually configured IP which has no connection to eth0 or the outside world. When I bring up networking it first brings up eth0 and then eth1, what happens is eth1 becomes the 'primary' network of the host and I lose my connection to DNS/NFS/NIS and the outside world.

If I login and manually bring up eth1 first, then eth0 everyone is happy and connections work. So, I'm looking for a solution to either bring up eth1 before eth0 or somehow make eth0 my primary IP and not have it be clobbered by eth1.

View 2 Replies View Related

General :: Fedora Ethernet File Locations For Auto Eth - X - Devices Missing Ifcfg-ethX Files

Jul 24, 2010

Missing ifcfg-eth[2-5] fileset for ZNYX 345Q Quad Port 10/100 cards. I have showing in the gui network device that my ports for my ZNYX ZX345Q Quad Port card my ports are Auto eth2, Auto eth3 etc. My Motherboard and Intel cards show as System eth0 and System eth1.

There ARE corresponding entries for those in my /etc/sysconfig/network-settings/ directory, but there are not ifcfg-eth[2-5] files to correspond to these adapters. Can I just write my own files and that will do it?

How does Fedora 12/13 load these drivers into the kernel without having these ifcfg files?

I'd love to know if there is another way Fedora controls NICs / other system resources.

View 1 Replies View Related

Debian Multimedia :: XOrg Auto-detect Failing To Detect Max Screen Resolution

May 29, 2011

I've installed Squeeze 2.6.32-5-amd64 on my laptop (Alienware M17X R3, Intel i7 Sandybridge, ATI Technologies Inc Broadway [ATI Mobility Radeon HD 6800 Series])The screen is 17", with maximum resolution of 1920 x 1080. After a default install of the operating system, the maximum resolution I can select is 1280 x 1024.My research so far has suggested that I need to edit the /etc/X11/xorg.conf file and provide xorg with the necessary resolution.

Again, by default, the xorg.conf file is not created. This leads me to believe that xorg is scanning my hardware at startup and providing me with whatever it thinks is appropriate. I tried following these instructions to generate an xorg.conf file. This process created an xorg.conf file under /root/.

When I copy this xorg.conf file to /etc/X11, I get a blank (i.e. black) screen. Deleting this file restores the default resolution 1280 x 1024.This system is dual booting with Windows 7. Under windows I am able to get a 1920 x 1080 resolution, so I know my hardware is up to it.At this stage I have yet to install the drivers for the Radeon graphics card.What are my options regarding configuring xorg to give me a higher screen resolution?

View 6 Replies View Related

Fedora Hardware :: Endless USB Loop - Detect - Disable - Detect

May 2, 2010

I have a new F12 install, and my syslog is filling up with messages about USB. I have 2 USB devices plugged in directly to the mobo (bluetooth keyboard receiver, touchscreen), and it keeps redetecting them and then disabling the port for some reason.

A small sample of what keeps on repeating:

Quote:

View 1 Replies View Related

Debian :: Where To Find The Fw-detect Command ? (for Firmware / Wireless Detect)

Jan 12, 2010

Code...
To find the appropriate firmware without knowing the make or brand of your wireless chip, you can use the command:

#fw-detect

But apparently debian package do not offer this useful tool, well, certainly for sidux exclusively.

Is there a package of fw-detect eventually?

View 5 Replies View Related

Networking :: ATT Uverse DHCP Not Assigning To Red Interface Interface On Smoothwall?

Feb 14, 2010

I just had an ATT Uverse RG installed. However my Smoothwall router that previously worked fine with the ADSL SpeedStream is no longer accepting an address assignment DHCP ip address from this new gateway. (3800HGV-B)Any thoughts ideas or experience working with this hardware? ATT only supports Windows and Mac

View 2 Replies View Related

Networking :: Prevent Auto Up An Interface At /etc/network/interface File ?

Jul 18, 2011

I have a ppp0 entry with post-up options like this

mapping ppp0
map none photon-plus motorola
map timeout: 12

[code]...

View 8 Replies View Related

General :: Unable To Use GUI Interface Meant Graphics Interface?

Apr 11, 2011

i am using windows 7 in my laptop and linux is installed on virtualBox but my problem is the screen is showing small in virtualbox is there any way to enalarge the screen to show like windows screen? i did before by using VGA setting but it made problem me i was not able to use GUI interface i meant graphics interface
it was just showing me Command Prompt.

View 8 Replies View Related

Security :: Iptables -L Does Not Show In-interface Or Out-interface?

Feb 26, 2011

When I do...# iptables -L...I see rules in my INPUT and OUTPUT chains that look scary:ACCEPT all -- anywhere anywhere...but these rules only apply to the loopback interface. I tested it and the server cannot be reached on open ports from the outside world. How can I make iptables show the interfaces that the rules apply to?Otherwise, every time I do iptables -L it will scare the crap out of me.

View 3 Replies View Related

Red Hat :: Add IPs To A Network Interface As Virtual Interface Like Eth0:0?

Apr 14, 2011

I found multiple sites explaining how to add IPs to a network interface as virtual interface like eth0:0. However I can add IPs to an interface as well using the ip command: ip a a 192.168.2.2/24 dev eth0 What I want to know is how I can make this persistent on rhel/centos.

View 2 Replies View Related

Ubuntu :: Terminal Bash / -bash: Ls: Command Not Found

Jun 5, 2011

I got a problem with terminal, since i'm really a noob with terminal i don't know how to fix it.Everytime i type in a command it shows for example:

-bash: ls: command not found

Even the basic commands don't work... just cd <directory> and those things works

View 9 Replies View Related

Programming :: Interface "eth0" Which Is Down - Wasn't Displayed But Loopback Interface Has Been Displayed

Jan 6, 2011

The following are the output of command "ifconfig -a":

[Code]....

The interface "eth0", which is down, was not displayed, but loopback interface has been displayed. So, how can I make my application display all interfaces, including the interfaces which are down, but excluding the loopback interface?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved