chiark / gitweb /
networkd: don't unlink state files on exit
authorTom Gundersen <teg@jklm.no>
Wed, 4 Feb 2015 14:16:40 +0000 (15:16 +0100)
committerTom Gundersen <teg@jklm.no>
Thu, 5 Feb 2015 10:50:46 +0000 (11:50 +0100)
Only unlink state files on DELLINK. This allows sd-network to be used even when networkd is not running.

src/network/networkd-link.c

index f4ab97f..1442230 100644 (file)
@@ -283,12 +283,10 @@ static void link_free(Link *link) {
         sd_dhcp_client_unref(link->dhcp_client);
         sd_dhcp_lease_unref(link->dhcp_lease);
 
-        unlink(link->lease_file);
         free(link->lease_file);
 
         sd_lldp_free(link->lldp);
 
-        unlink(link->lldp_file);
         free(link->lldp_file);
 
         sd_ipv4ll_unref(link->ipv4ll);
@@ -300,7 +298,6 @@ static void link_free(Link *link) {
 
         free(link->ifname);
 
-        unlink(link->state_file);
         free(link->state_file);
 
         udev_device_unref(link->udev_device);