diff options
author | Roman I Khimov <khimov@altell.ru> | 2010-03-27 22:37:16 +0300 |
---|---|---|
committer | Roman I Khimov <khimov@altell.ru> | 2010-03-29 22:13:25 +0400 |
commit | 99ac56dac1f93aa2c767383f86624147953e2afc (patch) | |
tree | d159cf8b76c030bf76a10ef2377b366e6c041bd6 /recipes/quagga | |
parent | 2d72e73306ff112c6c1dade6189539e3a7cbd867 (diff) |
quagga: fix access rights, add more postinst
Add null conf files for protocols (allows tighter permissions
setting and sets some starting point for configuration in general),
fix permissions for log directory.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Diffstat (limited to 'recipes/quagga')
-rw-r--r-- | recipes/quagga/files/volatiles.03_quagga | 1 | ||||
-rw-r--r-- | recipes/quagga/quagga.inc | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/recipes/quagga/files/volatiles.03_quagga b/recipes/quagga/files/volatiles.03_quagga index 672fec6b92..cfb896a17b 100644 --- a/recipes/quagga/files/volatiles.03_quagga +++ b/recipes/quagga/files/volatiles.03_quagga @@ -1,2 +1,3 @@ # <type> <owner> <group> <mode> <path> <linksource> d quagga quagga 0755 /var/run/quagga none +d quagga quagga 0755 /var/log/quagga none
\ No newline at end of file diff --git a/recipes/quagga/quagga.inc b/recipes/quagga/quagga.inc index 8d53ebc350..3c25861b9a 100644 --- a/recipes/quagga/quagga.inc +++ b/recipes/quagga/quagga.inc @@ -21,7 +21,7 @@ RDEPENDS_${PN}-watchquagga = "${PN}" # the "ip" command from busybox is not sufficient (flush by protocol flushes all routes) RDEPENDS_${PN} += "iproute2" -INC_PR = "r2" +INC_PR = "r3" QUAGGASUBDIR = "" @@ -117,11 +117,17 @@ INITSCRIPT_PARAMS_${PN}-watchquagga = "defaults 90 10" # Add quagga's user and groups pkg_postinst_${PN} () { + set -e grep -q quagga: /etc/group || addgroup quagga grep -q quaggavty: /etc/group || addgroup quaggavty grep -q quagga: /etc/passwd || \ adduser --disabled-password --home=/var/run/quagga/ --system \ - --ingroup quagga --no-create-home -g "Quagga routing suite" quagga + --ingroup quagga --no-create-home -g "Quagga routing suite" quagga + for f in bgpd isisd ospfd ripngd zebra ripd ospf6d; do touch /etc/quagga/$f.conf; done + chown quagga:quaggavty /etc/quagga + chown quagga:quagga /etc/quagga/*.conf + chmod 750 /etc/quagga + chown 640 /etc/quagga/*.conf /etc/init.d/populate-volatile.sh update } |