* [Buildroot] [PATCH] package/radvd: disable by default in systemd preset-all
@ 2020-02-22 14:47 unixmania at gmail.com
2020-02-22 18:12 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: unixmania at gmail.com @ 2020-02-22 14:47 UTC (permalink / raw)
To: buildroot
From: Carlos Santos <unixmania@gmail.com>
We don't provide a configuration file, so disable radvd by default.
Update the help message with instructions on how to enable radvd at
build time with systemd.
Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
package/radvd/50-radvd.preset | 1 +
package/radvd/Config.in | 8 ++++++++
package/radvd/radvd.mk | 6 ++++++
3 files changed, 15 insertions(+)
create mode 100644 package/radvd/50-radvd.preset
diff --git a/package/radvd/50-radvd.preset b/package/radvd/50-radvd.preset
new file mode 100644
index 0000000000..90d0ee4bbc
--- /dev/null
+++ b/package/radvd/50-radvd.preset
@@ -0,0 +1 @@
+disable radvd.service
diff --git a/package/radvd/Config.in b/package/radvd/Config.in
index 48aeedc08f..fa5a20c4c1 100644
--- a/package/radvd/Config.in
+++ b/package/radvd/Config.in
@@ -5,4 +5,12 @@ config BR2_PACKAGE_RADVD
help
IPv6 Router Advertisement Daemon.
+ On busybox and sysvinit systems, radvd will be started only if
+ a /etc/radvd.conf exists.
+
+ To enable it at build time with systemd, add /etc/radvd.conf
+ and a /etc/systemd/system-preset/40-radvd.preset file with
+
+ enable radvd.service
+
http://www.litech.org/radvd/
diff --git a/package/radvd/radvd.mk b/package/radvd/radvd.mk
index 5679e613d4..3358264f18 100644
--- a/package/radvd/radvd.mk
+++ b/package/radvd/radvd.mk
@@ -17,6 +17,12 @@ RADVD_AUTORECONF = YES
RADVD_LICENSE = BSD-4-Clause-like
RADVD_LICENSE_FILES = COPYRIGHT
+# We don't provide /etc/radvd.conf, so disable the service by default.
+define RADVD_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 0644 package/radvd/50-radvd.preset \
+ $(TARGET_DIR)/usr/lib/systemd/system-preset/50-radvd.preset
+endef
+
define RADVD_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/radvd/S50radvd $(TARGET_DIR)/etc/init.d/S50radvd
endef
--
2.18.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] package/radvd: disable by default in systemd preset-all
2020-02-22 14:47 [Buildroot] [PATCH] package/radvd: disable by default in systemd preset-all unixmania at gmail.com
@ 2020-02-22 18:12 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2020-02-22 18:12 UTC (permalink / raw)
To: buildroot
Carlos, All,
On 2020-02-22 11:47 -0300, unixmania at gmail.com spake thusly:
> From: Carlos Santos <unixmania@gmail.com>
>
> We don't provide a configuration file, so disable radvd by default.
>
> Update the help message with instructions on how to enable radvd at
> build time with systemd.
>
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> package/radvd/50-radvd.preset | 1 +
> package/radvd/Config.in | 8 ++++++++
> package/radvd/radvd.mk | 6 ++++++
> 3 files changed, 15 insertions(+)
> create mode 100644 package/radvd/50-radvd.preset
>
> diff --git a/package/radvd/50-radvd.preset b/package/radvd/50-radvd.preset
> new file mode 100644
> index 0000000000..90d0ee4bbc
> --- /dev/null
> +++ b/package/radvd/50-radvd.preset
> @@ -0,0 +1 @@
> +disable radvd.service
> diff --git a/package/radvd/Config.in b/package/radvd/Config.in
> index 48aeedc08f..fa5a20c4c1 100644
> --- a/package/radvd/Config.in
> +++ b/package/radvd/Config.in
> @@ -5,4 +5,12 @@ config BR2_PACKAGE_RADVD
> help
> IPv6 Router Advertisement Daemon.
>
> + On busybox and sysvinit systems, radvd will be started only if
> + a /etc/radvd.conf exists.
> +
> + To enable it at build time with systemd, add /etc/radvd.conf
> + and a /etc/systemd/system-preset/40-radvd.preset file with
> +
> + enable radvd.service
> +
> http://www.litech.org/radvd/
> diff --git a/package/radvd/radvd.mk b/package/radvd/radvd.mk
> index 5679e613d4..3358264f18 100644
> --- a/package/radvd/radvd.mk
> +++ b/package/radvd/radvd.mk
> @@ -17,6 +17,12 @@ RADVD_AUTORECONF = YES
> RADVD_LICENSE = BSD-4-Clause-like
> RADVD_LICENSE_FILES = COPYRIGHT
>
> +# We don't provide /etc/radvd.conf, so disable the service by default.
> +define RADVD_INSTALL_INIT_SYSTEMD
> + $(INSTALL) -D -m 0644 package/radvd/50-radvd.preset \
> + $(TARGET_DIR)/usr/lib/systemd/system-preset/50-radvd.preset
> +endef
> +
> define RADVD_INSTALL_INIT_SYSV
> $(INSTALL) -D -m 0755 package/radvd/S50radvd $(TARGET_DIR)/etc/init.d/S50radvd
> endef
> --
> 2.18.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-22 18:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-22 14:47 [Buildroot] [PATCH] package/radvd: disable by default in systemd preset-all unixmania at gmail.com
2020-02-22 18:12 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox