/*
 * nm_system_enable_loopback
 *
 * Bring up the loopback interface
 *
 */
void nm_system_enable_loopback (void)
{
	/* ifupdown isn't always installed (bgo #625427) */
	if (g_file_test ("/sbin/ifup", G_FILE_TEST_EXISTS))
		nm_spawn_process ("/sbin/ifup lo");
	else
		nm_generic_enable_loopback ();
}
void nm_backend_enable_loopback (void)
{
	gchar *comm;

	/* If anything goes wrong trying to open /proc/1/comm, we will assume OpenRC */
	if (!g_file_get_contents ("/proc/1/comm", &comm, NULL, NULL)) {
		nm_log_info (LOGD_CORE, "NetworkManager is running with OpenRC...");
		openrc_start_lo_if_necessary ();
		return;
	}

	if (g_strstr_len (comm, -1, "systemd")) {
		/* We use the generic loopback enabler if using systemd. */
		nm_log_info (LOGD_CORE, "NetworkManager is running with systemd...");
		nm_generic_enable_loopback ();
	} else {
		/* OpenRC otherwise. */
		nm_log_info (LOGD_CORE, "NetworkManager is running with OpenRC...");
		openrc_start_lo_if_necessary();
	}

	g_free (comm);
}
/*
 * nm_system_enable_loopback
 *
 * Bring up the loopback interface
 *
 */
void nm_system_enable_loopback (void)
{
	nm_generic_enable_loopback ();
}
void nm_backend_enable_loopback (void)
{
	nm_generic_enable_loopback ();
}