Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo netplug
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Sun Oct 09, 2016 12:18 pm    Post subject: gentoo netplug Reply with quote

i would like to use sys-apps/netplug because i have a very simple requirement, and i don't need a bazooka. all i need is to start/stop net.wlan0. i've found some relevant but v.old posts.

https://forums.gentoo.org/viewtopic-p-3010054.html#3010054
UberLord wrote:
netplug is smaller and lighter

ifplugd is more feature rich, but heavier and some of it's "advanced" features don't actually work.


https://forums.gentoo.org/viewtopic-p-7069304.html#7069304
trs79 wrote:
I haven't been able to find out much from Google/Gentoo wikis, but I've emerged netplug and nothing seems to happen when I plug/unplug an ethernet cable.

Also, I noticed there isn't any netplug script in /etc/init.d, I'm wondering how the daemon should be started then? I've invoked it manually, via netplud -F, which starts a process for eth0, but nothing shows up when I plug/unplug an interace.

.. which seems to be my exact situation. if i manually start it, netplugd detects my interface correctly. but that's all it does. it does not seem to release/acquire dhcp lease, when the interface goes down/up.

i followed the instructions on this post, as i couldn't find any other instructions on the wiki or elsewhere.
khayyam wrote:
all you need do is add it to the 'modules' handling the particular interface eg:

/etc/conf.d/net
Code:
modules_eth0="netplugd" # "plug" would also work

You then add the interface to start at the default run-level ... netplugd will then monitor the ethernet port for a cable connection and bring up the interface, run dhcp, etc.

Code:
ln -s /etc/init.d/net.lo /etc/init.d/net.eth0
rc-update add net.eth0 default

... all set.


there is also this post
depontius wrote:
In general, baselayout will "do the right thing" when you simply install netplug or ifplugd. As mentioned, I use netplug (the lighter-weight of the two) simply to get rid of the dhcp timeout when my system isn't connected to any network. No configuration was needed. I'm not even sure that it's necessary to add net.eth0 to the default runlevel.


Code:
$ man netplugd
..
 /etc/rc.d/init.d/netplugd
             The init(8) script that starts, stops, and displays status of the netplugd daemon.

init.d/netplugd init script mentioned in the man page is not installed by sys-apps/netplug, or i can't find it.
Code:
$ qlist sys-apps/netplug
/sbin/netplugd
/usr/share/man/man8/netplugd.8.bz2
/usr/share/doc/netplug-1.2.9.2-r1/ChangeLog
/usr/share/doc/netplug-1.2.9.2-r1/TODO.bz2
/usr/share/doc/netplug-1.2.9.2-r1/README.bz2
/usr/share/doc/netplug-1.2.9.2-r1/NEWS.bz2
/etc/netplug.d/netplug
/etc/netplug/netplugd.conf


gentoo networking seems to be working fine, except when my link goes down and up later.
_________________
"Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6754
Location: Blighty

PostPosted: Sun Oct 09, 2016 6:57 pm    Post subject: Reply with quote

The man page is referring to a an init script for distros other than Gentoo.
I can't help beyond that though as I no longer have a use for netplug and no longer maintain OpenRC.

But dhcpcd supports carrier detection fine. If your goal is to have a small DHCP client react to carrier events, just bypass the Gentoo networking entirely and add dhcpcd to the default runlevel.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Mon Oct 10, 2016 1:57 pm    Post subject: Reply with quote

UberLord wrote:
dhcpcd supports carrier detection fine. If your goal is to have a small DHCP client react to carrier events, just bypass the Gentoo networking entirely and add dhcpcd to the default runlevel.


thanks but dhcpcd is bloatware for my needs. udhcpc is ample and sufficient. i like em small ;)

i also like gentoo netifrc, and i have my network services dependent on net. all i do is /etc/init.d/net.${IFACE} restart and i can see all my services restarting. neat!
_________________
"Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6754
Location: Blighty

PostPosted: Mon Oct 10, 2016 2:12 pm    Post subject: Reply with quote

josephg wrote:

thanks but dhcpcd is bloatware for my needs. udhcpc is ample and sufficient. i like em small ;)


How small do you want to go?
I can reduce dhcpcd to a similar feature set of udhcpc at about 80k on i386 NetBSD. Probably about 90k on Gentoo because glibc lacks a few things NetBSD libc provides.
That still gives you link detection and dhcp option customisation.

Quote:
i also like gentoo netifrc, and i have my network services dependent on net. all i do is /etc/init.d/net.${IFACE} restart and i can see all my services restarting. neat!


No that is not neat.
Network facing application should be able to react to addresses being added/removed and address states changing without having to be restarted.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum