[oe-commits] [meta-openembedded] 16/17: arptables: add the directory for default /etc/sysconfig/arptables

git at git.openembedded.org git at git.openembedded.org
Wed Oct 12 10:10:09 UTC 2016


martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit 5ca0dc340ff59c0d512a893c9cddbce6a0946e6d
Author: Li Zhou <li.zhou at windriver.com>
AuthorDate: Wed Oct 12 11:33:49 2016 +0800

    arptables: add the directory for default /etc/sysconfig/arptables
    
    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>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list