[oe] [meta-oe][PATCH] arptables: add the directory for default /etc/sysconfig/arptables
Li Zhou
li.zhou at windriver.com
Wed Oct 12 03:33:49 UTC 2016
Solve the potential issue for previous commit
<arptables: add arptables systemd service file>: in a small build where
/etc/sysconfig directory doesn't exist, the action of adding default
configuration file (/etc/sysconfig/arptables) will fail.
Signed-off-by: Li Zhou <li.zhou at windriver.com>
---
.../recipes-support/arptables/arptables-0.0.3-4/arptables.service | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables.service b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables.service
index fa64342..f9fd56d 100644
--- a/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables.service
+++ b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables.service
@@ -5,7 +5,7 @@ Requires=network.target
[Service]
Type=oneshot
-ExecStartPre=/bin/sh -c "if [ ! -f /etc/sysconfig/arptables ]; then /usr/sbin/arptables-save > /etc/sysconfig/arptables; fi"
+ExecStartPre=/bin/sh -c "mkdir -p /etc/sysconfig; if [ ! -f /etc/sysconfig/arptables ]; then /usr/sbin/arptables-save > /etc/sysconfig/arptables; fi"
ExecStart=/bin/sh -c "/usr/sbin/arptables-restore < /etc/sysconfig/arptables"
ExecStartPost=/bin/sh -c "touch /var/lock/subsys/arptables"
RemainAfterExit=yes
--
2.9.3
More information about the Openembedded-devel
mailing list