LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 12-07-2012, 08:06 PM   #1
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 201Reputation: 201Reputation: 201
Running netconfig will not switch from static to DHCP


I have a 14.0 system that normally uses a static up address. I need to switch to dhcp to do some troubleshooting and reconfigure some things. Running netconfig as root I go through the prompts, reboot, and when the machine Combes back up not only is it not taking a new address, but ifconfig shows the same static IP address. Am I missing something? Is there someplace I have to edit manually as well to lose the static IP address?
 
Old 12-07-2012, 09:28 PM   #2
glorsplitz
Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 253

Rep: Reputation: 27
maybe something to do with /etc/udev/rules.d/70-persistent-net.rules? delete it and reboot

I'd just edit rc.inet1.conf to do dhcp, then restart rc.inet1.

Last edited by glorsplitz; 12-07-2012 at 10:53 PM. Reason: additional comments
 
Old 12-07-2012, 11:56 PM   #3
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, CentOS, OpenBSD, FreeBSD
Posts: 438

Rep: Reputation: Disabled
Have you tried editing /etc/rc.d/rc.inet1.conf manually, and set it to use DHCP?
 
Old 12-08-2012, 05:22 AM   #4
GazL
Senior Member
 
Registered: May 2008
Posts: 3,440

Rep: Reputation: 958Reputation: 958Reputation: 958Reputation: 958Reputation: 958Reputation: 958Reputation: 958Reputation: 958
One thing I've noticed is that if you ever select networkmanager in netconfig then it will chmod 755 rc.networkmanager, but there is no corresponding chmod 644 when you select one of the non-networkmanager options. You might want to check that networkmanager isn't interfering with what you want to happen.


I gave up on the stock netconfig and rc.inet1 a while back when I realised that having 300 lines of script in rc.inet1 and 100 lines of rc.inet1.conf were a little silly when all I need is this:
Code:
#! /bin/sh
#    /etc/rc.d/rc.inet1
#      Simpler replacement for Slackware's stock rc.inet1.

########################################################################

##  STOP  ##

if [ "$1" = "stop" -o "$1" = "restart" ]; then
   echo "Stopping network interfaces..."
   # /sbin/ifconfig lo down
   /sbin/ifconfig eth0 down

   /sbin/dhclient -x wlan0
   /usr/sbin/wpa_cli -i wlan0 terminate
fi

##  (RE)START  ##

if [ "$1" != "stop" ]; then
   echo "Starting network interfaces..."
   /sbin/ifconfig lo 127.0.0.1 
   /sbin/ifconfig eth0 192.168.1.2

   /usr/sbin/wpa_supplicant -B -D wext -i wlan0 \
                            -c /etc/wpa_supplicant.conf \
     && /sbin/dhclient wlan0
fi

########################################################################
 
  


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
switch DHCP to static IP gregoryp Linux - Server 3 12-27-2011 07:30 PM
How Do I Switch From Static IP To DHCP Psibur Linux - Networking 3 06-23-2005 09:40 AM
Switch DHCP to STATIC zaicheke Linux - Newbie 2 09-14-2004 09:12 PM
Switch DHCP to static Darkangel90 Linux - Networking 1 03-29-2004 05:15 AM
Switch from static IP to dhcp ? Fuel Linux - Networking 2 02-23-2002 09:21 PM


All times are GMT -5. The time now is 02:03 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