Add a ConditionPathIsDirectory on /run/network from ifup@ unit.
>From 1f747abf9d8351ae4174926255b9b82fccfe6ce2 Mon Sep 17 00:00:00 2001
From: Didier Roche <didro...@ubuntu.com>
Date: Fri, 14 Nov 2014 11:55:24 +0100
Subject: [PATCH] debian/ifup@.service: add a network ConditionPath

Add a ConditionPath on /run/network in case autogenerated networking.service
didn't need to start and so, didn't create this directory. Starting an ifup
service without this directory was resulting in the unit failing.
(Closes: # 769528)
---
 debian/changelog     | 7 +++++++
 debian/ifup@.service | 1 +
 2 files changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 49d9328..4215821 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 systemd (215-6) UNRELEASED; urgency=medium
 
+  [ Martin Pitt ]
   * Cherry-pick upstream patch to fix udev crash in link_config_get().
   * Cherry-pick upstream patch to fix tests in limited schroot environments.
   * Add d/p/Add-env-variable-for-machine-ID-path.patch: Allow specifying an
@@ -22,6 +23,12 @@ systemd (215-6) UNRELEASED; urgency=medium
     required so that tools like systemd-rfkill can be used with SysVinit or
     upstart scripts, too. (LP: #1387282)
 
+  [ Didier Roche ]
+  * debian/ifup@.service: add a ConditionPath on /run/network in case
+    autogenerated networking.service didn't need to start (and thus, didn't
+    create that directory). Starting an ifup service without this directory was
+    resulting in the unit failing. (Closes: # 769528)
+
  -- Martin Pitt <mp...@debian.org>  Sun, 12 Oct 2014 17:29:00 +0200
 
 systemd (215-5) unstable; urgency=medium
diff --git a/debian/ifup@.service b/debian/ifup@.service
index c7b2736..7198314 100644
--- a/debian/ifup@.service
+++ b/debian/ifup@.service
@@ -3,6 +3,7 @@ Description=ifup for %I
 After=local-fs.target networking.service
 Before=network.target
 BindsTo=sys-subsystem-net-devices-%i.device
+ConditionPathIsDirectory=/run/network
 DefaultDependencies=no
 
 [Service]
-- 
2.1.3

Reply via email to