Skip to contentSkip to conversation

quagga: Create /var/run/quagga on sysv

PATCH New Matt Weber 3 participants 4 messages Dec 21, 2016 – Dec 22, 2016

lore
Share & tools
lore

Matt Weber

author
#0 lore raw

PATCH 1/1 quagga: Create /var/run/quagga on sysv

From: Brandon Maier <[email protected]>

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.

---
 package/quagga/S99quagga | 6 ++++++
 package/quagga/quagga.mk | 4 ++++
 2 files changed, 10 insertions(+)
 create mode 100644 package/quagga/S99quagga
package/quagga/S99quagga new file +6 -0
new file mode 100644
index 0000000..e964387
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ ! -d /var/run/quagga ]; then
+       mkdir -p /var/run/quagga
+       chown quagga:quagga /var/run/quagga
+fi
package/quagga/quagga.mk +4 -0
index ad2aff4..4beff5d 100644
@@ -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))
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 quagga: Create /var/run/quagga on sysv

Hello,

Thanks for this patch!

package/quagga/S99quagga line 6

Quoted 12 lines · Matt Weber
package/quagga/S99quagga new file +6 -0
new file mode 100644
index 0000000..e964387
@@ -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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 quagga: Create /var/run/quagga on sysv

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hello,
Thanks for this patch!

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

Quoted 16 lines

package/quagga/S99quagga line 6

Quoted 12 lines
package/quagga/S99quagga new file +6 -0
new file mode 100644
index 0000000..e964387
@@ -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.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 quagga: Create /var/run/quagga on sysv

Peter//Thomas,

Quoted 24 lines · Peter Korsgaard
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hello,
Thanks for this patch!

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

Quoted 16 lines

package/quagga/S99quagga line 6

Quoted 12 lines
package/quagga/S99quagga new file +6 -0
new file mode 100644
index 0000000..e964387
@@ -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.

Quoted 2 lines

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.

Signature · 8 lines
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.