*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config IFPLUGD
+//config: bool "ifplugd"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: Network interface plug detection daemon.
+
+//applet:IF_IFPLUGD(APPLET(ifplugd, BB_DIR_USR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_IFPLUGD) += ifplugd.o
//usage:#define ifplugd_trivial_usage
//usage: "[OPTIONS]"
ifrequest.ifr_flags |= IFF_UP;
/* Let user know we mess up with interface */
bb_error_msg("upping interface");
- if (network_ioctl(SIOCSIFFLAGS, &ifrequest, "setting interface flags") < 0)
- xfunc_die();
+ if (network_ioctl(SIOCSIFFLAGS, &ifrequest, "setting interface flags") < 0) {
+ if (errno != ENODEV)
+ xfunc_die();
+ G.iface_exists = 0;
+ return;
+ }
}
#if 0 /* why do we mess with IP addr? It's not our business */