aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Shipp <nick@shipp.ninja>2017-01-29 01:55:03 -0500
committerNick Shipp <nick@shipp.ninja>2017-01-29 01:55:03 -0500
commit51bdf9b16594c4ad0c5e793583cfa0c12c61583c (patch)
tree9b58bff4f843f90c0a37c3d0d5a372128717e0d1
parent7ebbd64b16a8cd7d94961b34a394a511c08f0350 (diff)
Depend on dhcpcd starting wpa_supplicant
-rw-r--r--Makefile2
-rw-r--r--config.def.h5
-rw-r--r--sinit.c9
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 <fcntl.h>
#include <grp.h>
-#include <err.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@@ -174,19 +173,13 @@ 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)
{
struct stat info;