Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] quagga: Create /var/run/quagga on sysv
@ 2016-12-21  4:07 Matt Weber
  2016-12-21  9:03 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Weber @ 2016-12-21  4:07 UTC (permalink / raw)
  To: buildroot

From: Brandon Maier <brandon.maier@rockwellcollins.com>

The /var/run/quagga directory needs to be created at boot in order for
Quagga to work. Without it Quagga will fail to create the pid lock file.
It's already supported in systemd, now add basic support for sysv.

Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
---
 package/quagga/S99quagga | 6 ++++++
 package/quagga/quagga.mk | 4 ++++
 2 files changed, 10 insertions(+)
 create mode 100644 package/quagga/S99quagga

diff --git a/package/quagga/S99quagga b/package/quagga/S99quagga
new file mode 100644
index 0000000..e964387
--- /dev/null
+++ b/package/quagga/S99quagga
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ ! -d /var/run/quagga ]; then
+       mkdir -p /var/run/quagga
+       chown quagga:quagga /var/run/quagga
+fi
diff --git a/package/quagga/quagga.mk b/package/quagga/quagga.mk
index ad2aff4..4beff5d 100644
--- a/package/quagga/quagga.mk
+++ b/package/quagga/quagga.mk
@@ -79,4 +79,8 @@ define QUAGGA_INSTALL_INIT_SYSTEMD
 		$(TARGET_DIR)/usr/lib/systemd/system/quagga at .service
 endef
 
+define QUAGGA_INSTALL_INIT_SYSV
+	$(INSTALL) -D -m 755 package/quagga/S99quagga $(TARGET_DIR)/etc/init.d/S99quagga
+endef
+
 $(eval $(autotools-package))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] quagga: Create /var/run/quagga on sysv
  2016-12-21  4:07 [Buildroot] [PATCH] quagga: Create /var/run/quagga on sysv Matt Weber
@ 2016-12-21  9:03 ` Thomas Petazzoni
  2016-12-21  9:14   ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2016-12-21  9:03 UTC (permalink / raw)
  To: buildroot

Hello,

Thanks for this patch!

On Tue, 20 Dec 2016 22:07:33 -0600, Matt Weber wrote:

> diff --git a/package/quagga/S99quagga b/package/quagga/S99quagga
> new file mode 100644
> index 0000000..e964387
> --- /dev/null
> +++ b/package/quagga/S99quagga
> @@ -0,0 +1,6 @@
> +#!/bin/sh
> +
> +if [ ! -d /var/run/quagga ]; then
> +       mkdir -p /var/run/quagga
> +       chown quagga:quagga /var/run/quagga
> +fi

I think we would prefer to have a real init script, that not only
creates /var/run/quagga, but also starts quagga itself. I.e something
that does the same as the systemd unit file.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] quagga: Create /var/run/quagga on sysv
  2016-12-21  9:03 ` Thomas Petazzoni
@ 2016-12-21  9:14   ` Peter Korsgaard
  2016-12-22 14:21     ` Matthew Weber
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2016-12-21  9:14 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > Thanks for this patch!

 > On Tue, 20 Dec 2016 22:07:33 -0600, Matt Weber wrote:

 >> diff --git a/package/quagga/S99quagga b/package/quagga/S99quagga
 >> new file mode 100644
 >> index 0000000..e964387
 >> --- /dev/null
 >> +++ b/package/quagga/S99quagga
 >> @@ -0,0 +1,6 @@
 >> +#!/bin/sh
 >> +
 >> +if [ ! -d /var/run/quagga ]; then
 >> +       mkdir -p /var/run/quagga
 >> +       chown quagga:quagga /var/run/quagga
 >> +fi

 > I think we would prefer to have a real init script, that not only
 > creates /var/run/quagga, but also starts quagga itself. I.e something
 > that does the same as the systemd unit file.

Yes, agreed. Also notice that the explicit /var/run/quagga check isn't
needed when you use mkdir -p.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] quagga: Create /var/run/quagga on sysv
  2016-12-21  9:14   ` Peter Korsgaard
@ 2016-12-22 14:21     ` Matthew Weber
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Weber @ 2016-12-22 14:21 UTC (permalink / raw)
  To: buildroot

Peter//Thomas,

On Wed, Dec 21, 2016 at 3:14 AM, Peter Korsgaard <peter@korsgaard.com> wrote:
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
>
>  > Hello,
>  > Thanks for this patch!
>
>  > On Tue, 20 Dec 2016 22:07:33 -0600, Matt Weber wrote:
>
>  >> diff --git a/package/quagga/S99quagga b/package/quagga/S99quagga
>  >> new file mode 100644
>  >> index 0000000..e964387
>  >> --- /dev/null
>  >> +++ b/package/quagga/S99quagga
>  >> @@ -0,0 +1,6 @@
>  >> +#!/bin/sh
>  >> +
>  >> +if [ ! -d /var/run/quagga ]; then
>  >> +       mkdir -p /var/run/quagga
>  >> +       chown quagga:quagga /var/run/quagga
>  >> +fi
>
>  > I think we would prefer to have a real init script, that not only
>  > creates /var/run/quagga, but also starts quagga itself. I.e something
>  > that does the same as the systemd unit file.
>
> Yes, agreed. Also notice that the explicit /var/run/quagga check isn't
> needed when you use mkdir -p.

Thanks for the review, we're working on an update.

-- 
Matthew L Weber / Pr Software Engineer
Airborne Information Systems / Security Systems and Software / Secure Platforms
MS 131-100, C Ave NE, Cedar Rapids, IA, 52498, USA
www.rockwellcollins.com

Note: Any Export License Required Information and License Restricted
Third Party Intellectual Property (TPIP) content must be encrypted and
sent to matthew.weber at corp.rockwellcollins.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-22 14:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-21  4:07 [Buildroot] [PATCH] quagga: Create /var/run/quagga on sysv Matt Weber
2016-12-21  9:03 ` Thomas Petazzoni
2016-12-21  9:14   ` Peter Korsgaard
2016-12-22 14:21     ` Matthew Weber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox