Skip to contentSkip to conversation

misc fixes

PATCH Applied Mark Hatle 2 participants 7 messages Nov 19, 2013 – Nov 26, 2013

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

cover misc fixes

The following patch set includes some misc fixes for meta-networking.

These should be generally applicable, and can also be applied to the dora branch (as well as master).

author
#1 lore raw

PATCH 1/3 quagga: Fix watchquagga initscript problem.

From: Bopeng Liu <[email protected]>

Change the default config file for making watchquagga can startup successful

---
 .../recipes-protocols/quagga/files/watchquagga.default           | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
meta-networking/recipes-protocols/quagga/files/watchquagga.default +7 -2
index 53f6a8c..2d601ec 100644
@@ -2,6 +2,11 @@
 #watch_daemons="zebra bgpd ospfd ospf6d ripd ripngd"
 watch_daemons="zebra"
 
-# To enable restarts, uncomment this line (but first be sure to edit
+# To enable restarts when multiple daemons are being used, uncomment this line (but first be sure to edit
 # the WATCH_DAEMONS line to reflect the daemons you are actually using):
-watch_options="-z -b_ -r/etc/init.d/quagga_restart_%s -s/etc/init.d/quagga_start_%s -k/etc/init.d/quagga_stop_%s"
+#watch_options="-Az -b_ -r/etc/init.d/quagga_restart_%s -s/etc/init.d/quagga_start_%s -k/etc/init.d/quagga_stop_%s"
+
+# Since we are using one quagga daemon for now, use the following line. If using
+# multiple daemons, comment the line below and uncoment the line mentioned
+# above.
+watch_options="-z -b_ -r/etc/init.d/quagga_restart_%s"
Signature · 1 line
1.8.1.2.545.g2f19ada
#2 lore raw

Re: [meta-networking][PATCH 1/3] quagga: Fix watchquagga initscript problem.

Merged, thanks.
-J.

Quoted 27 lines · [[meta-networking][PATCH 1/3] quagga: Fix watchquagga initscript problem.] On…

From: Bopeng Liu <[email protected]>

Change the default config file for making watchquagga can startup successful

---
 .../recipes-protocols/quagga/files/watchquagga.default           | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
meta-networking/recipes-protocols/quagga/files/watchquagga.default +7 -2
index 53f6a8c..2d601ec 100644
@@ -2,6 +2,11 @@
 #watch_daemons="zebra bgpd ospfd ospf6d ripd ripngd"
 watch_daemons="zebra"
 
-# To enable restarts, uncomment this line (but first be sure to edit
+# To enable restarts when multiple daemons are being used, uncomment this line (but first be sure to edit
 # the WATCH_DAEMONS line to reflect the daemons you are actually using):
-watch_options="-z -b_ -r/etc/init.d/quagga_restart_%s -s/etc/init.d/quagga_start_%s -k/etc/init.d/quagga_stop_%s"
+#watch_options="-Az -b_ -r/etc/init.d/quagga_restart_%s -s/etc/init.d/quagga_start_%s -k/etc/init.d/quagga_stop_%s"
+
+# Since we are using one quagga daemon for now, use the following line. If using
+# multiple daemons, comment the line below and uncoment the line mentioned
+# above.
+watch_options="-z -b_ -r/etc/init.d/quagga_restart_%s"
Signature · 2 lines
-Joe MacDonald.
:wq
author
#3 lore raw

PATCH 2/3 proftpd: Convert proftpd group to system scope

In reply to Mark Hatle

From: Qiang Chen <[email protected]>

Proftpd is meant to be a system user, not a normal user of the system so lets pass the correct parameters to the system. Just add --system param when creating ftp group.

---
 meta-networking/recipes-daemons/proftpd/proftpd_1.3.4b.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-daemons/proftpd/proftpd_1.3.4b.bb +1 -1
index 6571b9c..29c3097 100644
@@ -60,7 +60,7 @@ INITSCRIPT_NAME = "proftpd"
 INITSCRIPT_PARAM = "defaults 85 15"
 
 USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "${FTPGROUP}"
+GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}"
 USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} ${FTPUSER}"
 
 FILES_${PN} += "/home/${FTPUSER}"
Signature · 1 line
1.8.1.2.545.g2f19ada
#4 lore raw

Re: [meta-networking][PATCH 2/3] proftpd: Convert proftpd group to system scope

Merged this one, the other two are giving me a bit of grief. I'll check back soon if it's not a quick fix.

-J.

Quoted 25 lines · [[meta-networking][PATCH 2/3] proftpd: Convert proftpd group to system scope]…

From: Qiang Chen <[email protected]>

Proftpd is meant to be a system user, not a normal user of the system so lets pass the correct parameters to the system. Just add --system param when creating ftp group.

---
 meta-networking/recipes-daemons/proftpd/proftpd_1.3.4b.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-daemons/proftpd/proftpd_1.3.4b.bb +1 -1
index 6571b9c..29c3097 100644
@@ -60,7 +60,7 @@ INITSCRIPT_NAME = "proftpd"
 INITSCRIPT_PARAM = "defaults 85 15"
 
 USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "${FTPGROUP}"
+GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}"
 USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} ${FTPUSER}"
 
 FILES_${PN} += "/home/${FTPUSER}"
Signature · 2 lines
-Joe MacDonald.
:wq
author
#5 lore raw

PATCH 3/3 ntpd: make start-stop-daemon command available for ntpd

In reply to Mark Hatle

From: Qiang Chen <[email protected]>

If ntpd script is being called by a non-root user using sudo, it will fail as follows:

/etc/init.d/ntpd restart
Stopping ntpd: /etc/init.d/ntpd: line 29: start-stop-daemon:
command not found
done
Starting ntpd: /etc/init.d/ntpd: line 24: start-stop-daemon:
command not found
done

This is because /etc/init.d/ntpd calls start-stop-daemon which is in /sbin (not in the default path for non-root users)

Explicitly configure the PATH to include /sbin.

Reworked to set PATH instead of hardcode the location of start-stop-daemon

---
 meta-networking/recipes-support/ntp/files/ntpd | 2 ++
 1 file changed, 2 insertions(+)
meta-networking/recipes-support/ntp/files/ntpd +2 -0
index ae50f13..53fa2d1 100755
@@ -1,5 +1,7 @@
 #! /bin/sh
 #
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
 # ntpd	init.d script for ntpdc from ntp.isc.org
 test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0
 # rcS contains TICKADJ
Signature · 1 line
1.8.1.2.545.g2f19ada
#6 lore raw

Re: [meta-networking][PATCH 3/3] ntpd: make start-stop-daemon command available for ntpd

Also merged. Thanks.
-J.

Quoted 40 lines · [[meta-networking][PATCH 3/3] ntpd: make start-stop-daemon command available…

From: Qiang Chen <[email protected]>

If ntpd script is being called by a non-root user using sudo, it will fail as follows:

/etc/init.d/ntpd restart
Stopping ntpd: /etc/init.d/ntpd: line 29: start-stop-daemon:
command not found
done
Starting ntpd: /etc/init.d/ntpd: line 24: start-stop-daemon:
command not found
done

This is because /etc/init.d/ntpd calls start-stop-daemon which is in /sbin (not in the default path for non-root users)

Explicitly configure the PATH to include /sbin.

Reworked to set PATH instead of hardcode the location of start-stop-daemon

---
 meta-networking/recipes-support/ntp/files/ntpd | 2 ++
 1 file changed, 2 insertions(+)
meta-networking/recipes-support/ntp/files/ntpd +2 -0
index ae50f13..53fa2d1 100755
@@ -1,5 +1,7 @@
 #! /bin/sh
 #
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
 # ntpd	init.d script for ntpdc from ntp.isc.org
 test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0
 # rcS contains TICKADJ
Signature · 2 lines
-Joe MacDonald.
:wq