FS#10369 - "netcfg2 -a" does not remove "/var/run/daemons/net-profiles"

Attached to Project: Arch Linux
Opened by m.f. (iggy) - Wednesday, 07 May 2008, 11:49 GMT
Last edited by James Rayner (iphitus) - Wednesday, 25 June 2008, 12:26 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To James Rayner (iphitus)
Architecture i686
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Before connecting with netcfg2 there is no "net-profiles" in /var/run/daemons. after netcfg2 <profile> it is. after "netcfg2 -a" the file is still there, so it indicates net-profiles-daemon is still running.

more information see forum:
http://bbs.archlinux.org/viewtopic.php?id=48221

Additional info:
* netcfg 2.0.6-1
This task depends upon

Closed by  James Rayner (iphitus)
Wednesday, 25 June 2008, 12:26 GMT
Reason for closing:  Fixed
Comment by Jan Spakula (bender02) - Wednesday, 07 May 2008, 23:10 GMT
This is fixable by replacing
-a|all_down)
all_down;;
by
-a|all_down)
all_down
if [ "$(ls -1 ${STATE_DIR}/profiles)" = "" ]; then
rm_daemon net-profiles
fi
;;
in /usr/bin/netcfg2.
It's just a check if there is still some profile managed by net-profiles, and if not, then rm_daemon. Maybe it should also check for interfaces.
I think the same check should be done on profile_down and interface_down, and even on profile_up (so that if it fails, the daemon doesn't record itself as running) - unless there is a reason for having net-profiles in /var/run/daemons even if there's no network managed by it.
Comment by James Rayner (iphitus) - Thursday, 08 May 2008, 08:26 GMT
Not a bug.

What if I netcfg -a, then netcfg homewireless?

To add/remove the daemon based on netcfg profile states is unneccesary.

The daemon itself just runs netcfg -a, and will do nothing and output absolutely nothing if there's no profiles.
Comment by James Rayner (iphitus) - Friday, 09 May 2008, 08:47 GMT
oops, corrected :)

Loading...