LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-20-2015, 02:10 PM   #1
goarilla
LQ Newbie
 
Registered: Sep 2005
Location: Belgium
Distribution: slackware 10
Posts: 13

Rep: Reputation: 2
rc.inet1 update


Hello,

I've updated the rc.inet1 script to use
the ip utility instead of the old and deprecated ifconfig/route programs.

I haven't had time to test it properly though.



Cheers,
Attached Files
File Type: txt rc.inet1.txt (11.3 KB, 118 views)
 
Old 11-29-2015, 08:07 PM   #2
WLD
LQ Newbie
 
Registered: Nov 2015
Distribution: Slack64-current, Slack64-14.1, Slack-13.37, RISC OS
Posts: 11

Rep: Reputation: Disabled
Couldn't you paste a patch of your changes? It'd make it easier to see the work you've done
 
Old 11-30-2015, 03:13 PM   #3
goarilla
LQ Newbie
 
Registered: Sep 2005
Location: Belgium
Distribution: slackware 10
Posts: 13

Original Poster
Rep: Reputation: 2
Ok here is the patch.
Attached Files
File Type: txt rc.inet1.patch.txt (6.7 KB, 75 views)

Last edited by goarilla; 11-30-2015 at 03:14 PM.
 
Old 12-06-2015, 11:20 AM   #4
chicken76
Member
 
Registered: Mar 2009
Distribution: Slackware
Posts: 114

Rep: Reputation: 2
What is the reason for not using ifconfig and route anymore? Does something break if we continue to use them?
 
Old 12-06-2015, 11:37 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,253

Rep: Reputation: 3035Reputation: 3035Reputation: 3035Reputation: 3035Reputation: 3035Reputation: 3035Reputation: 3035Reputation: 3035Reputation: 3035Reputation: 3035Reputation: 3035
I have found this link on Eric Hameleers' blog.
 
Old 12-06-2015, 03:28 PM   #6
GazL
Senior Member
 
Registered: May 2008
Posts: 4,679
Blog Entries: 12

Rep: Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176
'ifconfig' is in POSIX, so it's not likely to be going anywhere.

'ip' is more UNIXy from a Doug McIlroy "Write programs to handle text streams, because that is a universal interface." perspective, which allows you to do stuff like this:

rc.inet1:
Code:
#!/sbin/ip -batch

address flush dev lo
address add 127.0.0.1/8 dev lo

address flush dev eth0
address add 192.168.0.2/24 dev eth0

route add default via 192.168.0.1 dev eth0
... so I do kind of like 'ip', but my muscle memory still has me typing "ifconfig ..." long before it ever occurs to me to use the 'ip' command.
 
Old 12-07-2015, 01:20 AM   #7
chicken76
Member
 
Registered: Mar 2009
Distribution: Slackware
Posts: 114

Rep: Reputation: 2
So 'ifconfig' is still suitable for rc.inet1, and the use of 'ip' is more a user preference than a requirement?
 
Old 12-07-2015, 02:08 AM   #8
elcore
Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 465

Rep: Reputation: Disabled
Quote:
Originally Posted by chicken76 View Post
So 'ifconfig' is still suitable for rc.inet1, and the use of 'ip' is more a user preference than a requirement?
Yes. But keep in mind some users have hardware which ifconfig doesn't fully support.
For the rest of us, it will continue to work until the linux kernel stops supporting it.

Quote:
From ifconfig man:
Ifconfig uses obsolete kernel interface.
It uses the ioctl access method to get the full address information, which limits hardware addresses to 8 bytes.
Since an Infiniband address is 20 bytes, only the first 8 bytes of Infiniband address are displayed.
 
Old 12-07-2015, 03:05 PM   #9
goarilla
LQ Newbie
 
Registered: Sep 2005
Location: Belgium
Distribution: slackware 10
Posts: 13

Original Poster
Rep: Reputation: 2
Well net-tools is deprecated (http://www.linuxfoundation.org/colla...king/net-tools).
Other distro's (centos) don't even install them anymore.

Last edited by goarilla; 12-07-2015 at 03:09 PM.
 
Old 12-07-2015, 08:57 PM   #10
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
That's one reason I love slackware. If it (still) works, don't fix it.

Last edited by fsbooks; 12-07-2015 at 08:57 PM. Reason: typo
 
Old 12-08-2015, 01:04 AM   #11
elcore
Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 465

Rep: Reputation: Disabled
Quote:
Originally Posted by goarilla View Post
Well net-tools is deprecated (http://www.linuxfoundation.org/colla...king/net-tools).
Other distro's (centos) don't even install them anymore.
There are plenty of tools in slackware that are deprecated by redhat for various reasons.
As long as the kernel provides the interface, I see no benefit in this upgrade and I will keep using net-tools regardless of rc.inet1
You could ask Linus to remove it, but you'll need a better reason than 'centos did it' because gentoo and several other systems may still use it.
Anyway, it's just my opinion, you know who's in charge, and why there are no polls here.
 
Old 12-08-2015, 02:09 PM   #12
goarilla
LQ Newbie
 
Registered: Sep 2005
Location: Belgium
Distribution: slackware 10
Posts: 13

Original Poster
Rep: Reputation: 2
I don't want to change to iproute2 specifically neither.
But I don't want us to have to scramble around when upstream does decide to pull the plug.
 
Old 12-09-2015, 01:53 AM   #13
elcore
Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 465

Rep: Reputation: Disabled
In that case, I would not worry about it unless there's a serious flaw.
If the tools were really obsolete, NetBSD-current would probably discard them.
However, I can see how it can be misleading if one manual says they're obsolete and the other does not.
 
Old 12-09-2015, 06:55 AM   #14
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: Newport News, VA
Distribution: Slackware
Posts: 5,053

Rep: Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860
Quote:
Originally Posted by goarilla View Post
I don't want to change to iproute2 specifically neither.
But I don't want us to have to scramble around when upstream does decide to pull the plug.
Just because upstream may pull the plug doesn't mean Pat would have to ship that version. There are many pieces of software that are in Slackware that are not the newest versions. Pat balances stability with usage and that sometimes means we won't have the latest versions of something.

That being said, I still think this was a worthwhile endeavor. It helped you learn more about Slackware's networking, and can help others learn more too if they dig through it. Plus it's always nice to have alternatives
 
  


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
Modifications to rc.inet1, rc.inet1.conf and rc.wireless hba Slackware 1 12-07-2014 03:57 AM
problems with rc.inet1 after kernel update samfoy Linux - Kernel 1 05-19-2010 05:18 AM
rc.inet1 gone... reikyv Slackware 4 11-27-2007 07:32 AM
/etc/rc.d/rc.inet1 ratmz Slackware 1 11-10-2005 12:38 PM
rc.inet1 and rc.inet1.conf edafe Slackware 0 02-16-2005 09:51 AM

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

All times are GMT -5. The time now is 06:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration