LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-07-2008, 03:11 PM   #1
Romanus81
Member
 
Registered: Feb 2008
Posts: 201

Rep: Reputation: 31
Can someone tell me what this script is trying to do? <Realtek driver dhcp script>


I've had off and on internet problems lately, and I think this might be the problem. I compiled some drivers I got from realtek, and it seems to be made for a different distro, as Slackware doesn't have a /etc/sysconfig/network-scripts/ directory.

Code:
#!/bin/bash

#cp ifcfg-ath0 /etc/sysconfig/network-scripts/
cp ifcfg-wlan0 /etc/sysconfig/network-scripts/

#dhclient ath0
dhclient wlan0

#var1=`ifconfig ath0 |awk '/inet/{print $2}'|awk -F: '{print $2}'`
var1=`ifconfig wlan0 |awk '/inet/{print $2}'|awk -F: '{print $2}'`

#var2=`ps aux|awk '/dhclient ath0/'|awk '$11!="awk"{print $2}'`
var2=`ps aux|awk '/dhclient wlan0/'|awk '$11!="awk"{print $2}'`

kill $var2

#rm -f /etc/sysconfig/network-scripts/ifcfg-ath0
rm -f /etc/sysconfig/network-scripts/ifcfg-wlan0

echo "get ip: $var1"
And here is the ifcfg-wlan0 file it is trying to copy.
Code:
#DHCP client
DEVICE=wlan0
BOOTPROTO=dhcp
ONBOOT=yes
Is there a slackware equvalent to the /etc/sysconfig/network-scripts/ directory where I can place this file? Or does slackware come with something that does what this script is trying to do? I ask because my wireless is so unstable that I can't use my laptop for any of my college work on campus.
 
Old 09-07-2008, 03:23 PM   #2
the3dfxdude
Member
 
Registered: May 2007
Posts: 730

Rep: Reputation: 358Reputation: 358Reputation: 358Reputation: 358
The scripts /etc/rc.d/rc.inet1* do what you want. And for wireless devices /etc/rc.d/rc.wireless* helps configure it.

You should be using an in-kernel driver if at all possible. I believe your card will most likely have support. The best support comes in kernel 2.6.25 and later. If you want us to help you better, post your slackware version and kernel version.
 
Old 09-07-2008, 03:27 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Also, post the part of "lspci -v" that pertains to your network card.

Eric
 
Old 09-07-2008, 07:10 PM   #4
Romanus81
Member
 
Registered: Feb 2008
Posts: 201

Original Poster
Rep: Reputation: 31
I got help with this problem before, but the thread kind of died after I thought it was fixed.
I ended up reinstalling, because in the numerous fixes I tried I probably did more harm than good. Plus I am working on a page on the MSI Wind wiki on how to get it working.

This was my last thread:
http://www.linuxquestions.org/questi...twork.-666685/

I am currently running 12.1 with a 2.6.26.3 kernel with the realtek rtl8180 kernel drivers compiled as modules, and the realtek r8180 module compiled from source. I had to load the r8180 modules for wlan0 to appear on my system.
The r8180 modules are really buggy and compiled with a lot of errors. I was, on my previous install, able to connect to the internet for a short time, but later had no luck.
Would compiling the rtl8180 drivers INTO the kernel instead of as modules eliminate the need for the buggy compiled drivers?
Code:
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Unknown device 8199 (rev 22)
	Subsystem: Micro-Star International Co., Ltd. Unknown device 6894
	Flags: bus master, fast devsel, latency 0, IRQ 17
	I/O ports at b000 [size=256]
	Memory at dfc00000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
	Capabilities: [70] Express Legacy Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting <?>
	Capabilities: [140] Virtual Channel <?>
	Capabilities: [160] Device Serial Number 00-1d-92-c6-db-84-00-00
	Kernel driver in use: rtl8180
	Kernel modules: r8180
My goal is to get wifi to work. So far, my rc.wireless.conf is unchanged, i.e. it still has the ESSID="any" entry uncommented.
My rc.inet1.conf I went down to ifname[4]= and added some information.
IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
WLAN_ESSID[4]="Univ-Hotspot"
WLAN_MODE[4]="Master"

All hotspots around campus use "Univ-Hotspot" as their essid. When I did manage to get it connected I remember that the mode was Master, so I put that in.
Is there any information, like where my laptop should look for a ip, that I can get from the campus computer department that might help me?
 
  


Reply



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
DHCP renewal script erikbjork Linux - Networking 2 05-20-2008 02:19 AM
dhcp server script on Slackware 11.0 ? tiuz Slackware 3 10-21-2006 11:04 AM
DHCP Script FlameKhan Linux - Networking 6 09-05-2005 01:30 AM
DHCP Problems - Script? Kane635 Linux - Software 3 09-18-2004 04:42 PM
firewall script. DHCP? e1000 Linux - Networking 1 11-08-2003 08:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:07 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration