diff mbox series

[2/2] package/eudev: support openrc init

Message ID 20200227145123.5654-3-unixmania@gmail.com
State Accepted
Headers show
Series [1/2] udev-gentoo-scripts: new packages | expand

Commit Message

Carlos Santos Feb. 27, 2020, 2:51 p.m. UTC
From: Carlos Santos <unixmania@gmail.com>

Select udev-gentoo-scripts and avoid installing the sysv init script.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
 package/eudev/Config.in | 1 +
 package/eudev/eudev.mk  | 4 ++++
 2 files changed, 5 insertions(+)

Comments

Yann E. MORIN Feb. 27, 2020, 8:35 p.m. UTC | #1
Carlos, All,

On 2020-02-27 11:51 -0300, unixmania@gmail.com spake thusly:
> From: Carlos Santos <unixmania@gmail.com>
> 
> Select udev-gentoo-scripts and avoid installing the sysv init script.
> 
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
> ---
>  package/eudev/Config.in | 1 +
>  package/eudev/eudev.mk  | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/package/eudev/Config.in b/package/eudev/Config.in
> index b1d2f37a72..b0ce76171a 100644
> --- a/package/eudev/Config.in
> +++ b/package/eudev/Config.in
> @@ -5,6 +5,7 @@ config BR2_PACKAGE_EUDEV
>  	depends on BR2_USE_WCHAR # needs C99 compiler
>  	depends on !BR2_STATIC_LIBS # kmod
>  	select BR2_PACKAGE_HAS_UDEV
> +	select BR2_PACKAGE_UDEV_GENTOO_SCRIPTS if BR2_INIT_OPENRC
>  	select BR2_PACKAGE_UTIL_LINUX
>  	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
>  	select BR2_PACKAGE_KMOD
> diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
> index 99b5befd09..abcabb343c 100644
> --- a/package/eudev/eudev.mk
> +++ b/package/eudev/eudev.mk
> @@ -44,9 +44,13 @@ else
>  EUDEV_CONF_OPTS += --disable-selinux
>  endif
>  
> +# Avoid installing S10udev with openrc, as the service is started by a unit
> +# from the udev-gentoo-scripts package.
> +ifeq ($(BR2_INIT_OPENRC),)
>  define EUDEV_INSTALL_INIT_SYSV
>  	$(INSTALL) -D -m 0755 package/eudev/S10udev $(TARGET_DIR)/etc/init.d/S10udev
>  endef
> +endif

There is indeed no sane solution but a hack in this situation. However,
I prefer the previous version that defined a fake hook, so I reused that
instead (with a little tweak of yours from another comment! ;-) ).

Applied to next with that fixed. Thanks!

Regards,
Yann E. MORIN.

>  # Required by default rules for input devices
>  define EUDEV_USERS
> -- 
> 2.18.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/eudev/Config.in b/package/eudev/Config.in
index b1d2f37a72..b0ce76171a 100644
--- a/package/eudev/Config.in
+++ b/package/eudev/Config.in
@@ -5,6 +5,7 @@  config BR2_PACKAGE_EUDEV
 	depends on BR2_USE_WCHAR # needs C99 compiler
 	depends on !BR2_STATIC_LIBS # kmod
 	select BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_UDEV_GENTOO_SCRIPTS if BR2_INIT_OPENRC
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 	select BR2_PACKAGE_KMOD
diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
index 99b5befd09..abcabb343c 100644
--- a/package/eudev/eudev.mk
+++ b/package/eudev/eudev.mk
@@ -44,9 +44,13 @@  else
 EUDEV_CONF_OPTS += --disable-selinux
 endif
 
+# Avoid installing S10udev with openrc, as the service is started by a unit
+# from the udev-gentoo-scripts package.
+ifeq ($(BR2_INIT_OPENRC),)
 define EUDEV_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 package/eudev/S10udev $(TARGET_DIR)/etc/init.d/S10udev
 endef
+endif
 
 # Required by default rules for input devices
 define EUDEV_USERS