1abbee
From f79f65a2957cca23e0347eb2c9dfbd53be5c8dba Mon Sep 17 00:00:00 2001
1abbee
From: Michal Sekletar <msekleta@redhat.com>
1abbee
Date: Mon, 8 Aug 2016 15:15:14 +0200
1abbee
Subject: [PATCH] Revert "install: fix disable via unit file path"
1abbee
1abbee
This reverts commit 96df052a6a9d09cde2d437861727bf37fe6446b4.
1abbee
1abbee
Related: #1348208
1abbee
---
1abbee
 src/shared/install.c | 8 +++-----
1abbee
 1 file changed, 3 insertions(+), 5 deletions(-)
1abbee
1abbee
diff --git a/src/shared/install.c b/src/shared/install.c
c62b8e
index f7f9866f4d..9962508b1a 100644
1abbee
--- a/src/shared/install.c
1abbee
+++ b/src/shared/install.c
1abbee
@@ -1910,12 +1910,10 @@ int unit_file_disable(
1abbee
                 return r;
1abbee
 
1abbee
         STRV_FOREACH(i, files) {
1abbee
+                if (!unit_name_is_valid(*i, UNIT_NAME_ANY))
1abbee
+                        return -EINVAL;
1abbee
 
1abbee
-                if (!is_path(*i))
1abbee
-                        r = install_info_add(&c, *i, NULL, NULL);
1abbee
-                else
1abbee
-                        r = install_info_add(&c, NULL, *i, NULL);
1abbee
-
1abbee
+                r = install_info_add(&c, *i, NULL, NULL);
1abbee
                 if (r < 0)
1abbee
                         return r;
1abbee
         }