Could fetchmail get started/stopped in /etc/network/if-*.d?

Bug #29222 reported by hunger
8
Affects Status Importance Assigned to Milestone
fetchmail (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Hi there!

As fetchmail is only useful if a network connection is available, would it be possible to start/stop it as part of the network setup process? This would be somewhat similar to how ntpdate is handled nowadays in dapper.

It could get started in if-up.d if it is not yet running and stopped in if-down.d once no more interfaces are open. Both cases would need to ignoring lo of course.

This would get rid of one process when the host is not connected to a network, freeing ~2MiB of RAM that is hard to swap out (fetchmail runs regularly after all). It would further make one more init-script obsolete, sliming down the boot process some more.

PS: Couldn't other network services get handled in a similar way? What good are things like samba without a non-lo interface?

Revision history for this message
Martin Pitt (pitti) wrote :

Hi Scott, it seems that this is merely a question of moving the init script to if-up.d, right?

Revision history for this message
hunger (hunger) wrote :

There are scripts in /etc/ppp/ip-up.d that start/stop fetchmail.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Mostly yes, it'd need modifying and unifying with whatever else is there. But go for it, next week while we're together could be good.

Revision history for this message
Martin Pitt (pitti) wrote :

OK, assigning to me

Changed in fetchmail:
assignee: nobody → pitti
Revision history for this message
hunger (hunger) wrote :

Changing status to "confirmed" after two developers agreed to it.

Changed in fetchmail:
status: Unconfirmed → Confirmed
Martin Pitt (pitti)
Changed in fetchmail:
assignee: pitti → nobody
Revision history for this message
Bryce Harrington (bryce) wrote :

It looks like this has been implemented by fetchmail.ppp.ip-down / fetchmail.ppp.ip-up in current fetchmail, so this can be closed as resolved.

Changed in fetchmail (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.