From 51bdf9b16594c4ad0c5e793583cfa0c12c61583c Mon Sep 17 00:00:00 2001 From: Nick Shipp Date: Sun, 29 Jan 2017 01:55:03 -0500 Subject: Depend on dhcpcd starting wpa_supplicant --- Makefile | 2 +- config.def.h | 5 +---- sinit.c | 9 +-------- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 4d4ee77..fbe3a30 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CC = musl-gcc OBJ = sinit.o BIN = sinit -CFLAGS = $(shell pkg-config --cflags libevdev) -Os +CFLAGS = -Os all: $(BIN) poweroff reboot diff --git a/config.def.h b/config.def.h index 9879dcb..9fcbc98 100644 --- a/config.def.h +++ b/config.def.h @@ -25,7 +25,6 @@ static gid_t const groups[] = { 92, /* audio */ }; -int wpa_started(void); int udev_settled(void); static struct { @@ -37,10 +36,8 @@ static struct { NULL, { "/usr/bin/udevd", "--daemon", NULL }, NULL, { "/usr/bin/udevadm", "trigger", "-c", "add", NULL }, NULL, { "/usr/bin/udevadm", "settle", NULL }, - NULL, { "/usr/bin/wpa_supplicant", "-iwlan0", "-c", "/etc/wpa_supplicant/wpa_supplicant.conf", NULL }, NULL, { "/usr/bin/thermald", NULL }, - wpa_started, { "/usr/bin/wpa_cli", "-a", "/usr/local/bin/run_dhcpcd.sh", NULL }, - wpa_started, { "/usr/bin/dhcpcd", "wlan0", NULL }, + NULL, { "/usr/bin/dhcpcd", "-M", NULL }, udev_settled, { "/usr/bin/illum-d", NULL }, }; diff --git a/sinit.c b/sinit.c index 65dfa30..a99598a 100644 --- a/sinit.c +++ b/sinit.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include @@ -174,18 +173,12 @@ mounts(void) static_mounts[i].flags, static_mounts[i].data) != 0) { - warn("mount %s", static_mounts[i].target); + perror(static_mounts[i].target); } } } -int -wpa_started(void) -{ - return ! access("/var/run/wpa_supplicant/wlan0", O_RDONLY); -} - int udev_settled(void) { -- cgit v1.2.3-54-g00ecf