diff options
-rw-r--r-- | meta-oe/recipes-connectivity/iwd/iwd/iwd | 42 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/iwd/iwd_3.3.bb | 11 |
2 files changed, 52 insertions, 1 deletions
diff --git a/meta-oe/recipes-connectivity/iwd/iwd/iwd b/meta-oe/recipes-connectivity/iwd/iwd/iwd new file mode 100644 index 0000000000..89fc75c9ab --- /dev/null +++ b/meta-oe/recipes-connectivity/iwd/iwd/iwd | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | DAEMON=/usr/libexec/iwd | ||
4 | PIDFILE=/var/run/iwd.pid | ||
5 | DESC="iNet wireless daemon" | ||
6 | |||
7 | if [ -f /etc/default/iwd ] ; then | ||
8 | . /etc/default/iwd | ||
9 | fi | ||
10 | |||
11 | set -e | ||
12 | |||
13 | do_start() { | ||
14 | start-stop-daemon --start --background --name iwd --quiet --exec $DAEMON | ||
15 | } | ||
16 | |||
17 | do_stop() { | ||
18 | start-stop-daemon --stop --oknodo --name iwd --quiet | ||
19 | } | ||
20 | |||
21 | case "$1" in | ||
22 | start) | ||
23 | echo "Starting $DESC" | ||
24 | do_start | ||
25 | ;; | ||
26 | stop) | ||
27 | echo "Stopping $DESC" | ||
28 | do_stop | ||
29 | ;; | ||
30 | restart|force-reload) | ||
31 | echo "Restarting $DESC" | ||
32 | do_stop | ||
33 | sleep 1 | ||
34 | do_start | ||
35 | ;; | ||
36 | *) | ||
37 | echo "Usage: $0 {start|stop|restart|force-reload}" >&2 | ||
38 | exit 1 | ||
39 | ;; | ||
40 | esac | ||
41 | |||
42 | exit 0 \ No newline at end of file | ||
diff --git a/meta-oe/recipes-connectivity/iwd/iwd_3.3.bb b/meta-oe/recipes-connectivity/iwd/iwd_3.3.bb index 84b1795995..9d5b3658ae 100644 --- a/meta-oe/recipes-connectivity/iwd/iwd_3.3.bb +++ b/meta-oe/recipes-connectivity/iwd/iwd_3.3.bb | |||
@@ -7,10 +7,11 @@ DEPENDS = "dbus" | |||
7 | 7 | ||
8 | SRC_URI = "https://www.kernel.org/pub/linux/network/wireless/${BP}.tar.xz \ | 8 | SRC_URI = "https://www.kernel.org/pub/linux/network/wireless/${BP}.tar.xz \ |
9 | file://0001-build-Use-abs_top_srcdir-instead-of-abs_srcdir-for-e.patch \ | 9 | file://0001-build-Use-abs_top_srcdir-instead-of-abs_srcdir-for-e.patch \ |
10 | file://iwd \ | ||
10 | " | 11 | " |
11 | SRC_URI[sha256sum] = "8189e15e701112f871fb5f5e9351f007c9098754b4168ed43cc5422a3adc0255" | 12 | SRC_URI[sha256sum] = "8189e15e701112f871fb5f5e9351f007c9098754b4168ed43cc5422a3adc0255" |
12 | 13 | ||
13 | inherit autotools manpages pkgconfig python3native systemd | 14 | inherit autotools manpages pkgconfig python3native systemd update-rc.d |
14 | 15 | ||
15 | PACKAGECONFIG ??= " \ | 16 | PACKAGECONFIG ??= " \ |
16 | client \ | 17 | client \ |
@@ -24,6 +25,9 @@ PACKAGECONFIG[wired] = "--enable-wired,--disable-wired" | |||
24 | PACKAGECONFIG[ofono] = "--enable-ofono,--disable-ofono" | 25 | PACKAGECONFIG[ofono] = "--enable-ofono,--disable-ofono" |
25 | PACKAGECONFIG[systemd] = "--with-systemd-unitdir=${systemd_system_unitdir},--disable-systemd-service,systemd" | 26 | PACKAGECONFIG[systemd] = "--with-systemd-unitdir=${systemd_system_unitdir},--disable-systemd-service,systemd" |
26 | 27 | ||
28 | INITSCRIPT_NAME = "iwd" | ||
29 | INITSCRIPT_PARAMS = "start 04 5 2 3 . stop 23 0 1 6 ." | ||
30 | |||
27 | SYSTEMD_SERVICE:${PN} = " \ | 31 | SYSTEMD_SERVICE:${PN} = " \ |
28 | iwd.service \ | 32 | iwd.service \ |
29 | ${@bb.utils.contains('PACKAGECONFIG', 'wired', 'ead.service', '', d)} \ | 33 | ${@bb.utils.contains('PACKAGECONFIG', 'wired', 'ead.service', '', d)} \ |
@@ -36,6 +40,11 @@ do_configure:prepend() { | |||
36 | do_install:append() { | 40 | do_install:append() { |
37 | # If client and monitor are disabled, bindir is empty, causing a QA error | 41 | # If client and monitor are disabled, bindir is empty, causing a QA error |
38 | rmdir --ignore-fail-on-non-empty ${D}/${bindir} | 42 | rmdir --ignore-fail-on-non-empty ${D}/${bindir} |
43 | |||
44 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
45 | install -d ${D}${sysconfdir}/init.d | ||
46 | install -m 0755 ${UNPACKDIR}/iwd ${D}${sysconfdir}/init.d/iwd | ||
47 | fi | ||
39 | } | 48 | } |
40 | 49 | ||
41 | FILES:${PN} += " \ | 50 | FILES:${PN} += " \ |