diff options
author | Li Zhou <li.zhou@windriver.com> | 2016-10-12 11:33:49 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2016-10-20 11:17:03 -0400 |
commit | 5abe6ead049ae73980ce7cc0f973864542ef36ed (patch) | |
tree | f737d948d6ad558b420572054c4b025202f8dfb3 /meta-networking/recipes-support/arptables | |
parent | a0e2240e0a7300dfc20b11e7057156158c42aca9 (diff) | |
download | meta-openembedded-5abe6ead049ae73980ce7cc0f973864542ef36ed.tar.gz |
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@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-support/arptables')
-rw-r--r-- | meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables.service | 2 |
1 files changed, 1 insertions, 1 deletions
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 fa6434265..f9fd56df0 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 | |||
5 | 5 | ||
6 | [Service] | 6 | [Service] |
7 | Type=oneshot | 7 | Type=oneshot |
8 | ExecStartPre=/bin/sh -c "if [ ! -f /etc/sysconfig/arptables ]; then /usr/sbin/arptables-save > /etc/sysconfig/arptables; fi" | 8 | ExecStartPre=/bin/sh -c "mkdir -p /etc/sysconfig; if [ ! -f /etc/sysconfig/arptables ]; then /usr/sbin/arptables-save > /etc/sysconfig/arptables; fi" |
9 | ExecStart=/bin/sh -c "/usr/sbin/arptables-restore < /etc/sysconfig/arptables" | 9 | ExecStart=/bin/sh -c "/usr/sbin/arptables-restore < /etc/sysconfig/arptables" |
10 | ExecStartPost=/bin/sh -c "touch /var/lock/subsys/arptables" | 10 | ExecStartPost=/bin/sh -c "touch /var/lock/subsys/arptables" |
11 | RemainAfterExit=yes | 11 | RemainAfterExit=yes |