core: change top-level drop-in from -.service.d to service.d

Discussed in #13743, the -.service semantic conflicts with the
existing root mount and slice names, making this feature not
uniformly extensible to all types. Change the name to be
<type>.d instead.

Updating to this format also extends the top-level dropin to
unit types.
This commit is contained in:
Anita Zhang
2019-11-07 08:34:53 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 8069017a0f
commit 3e1db806b0
11 changed files with 27 additions and 103 deletions
-19
View File
@@ -353,24 +353,6 @@ static void test_unit_name_build(void) {
free(t);
}
static void test_service_unit_name_is_valid(void) {
assert_se(service_unit_name_is_valid("foo.service"));
assert_se(service_unit_name_is_valid("foo@bar.service"));
assert_se(service_unit_name_is_valid("foo@bar@bar.service"));
assert_se(service_unit_name_is_valid("--.service"));
assert_se(service_unit_name_is_valid(".-.service"));
assert_se(service_unit_name_is_valid("-foo-bar.service"));
assert_se(service_unit_name_is_valid("-foo-bar-.service"));
assert_se(service_unit_name_is_valid("foo-bar-.service"));
assert_se(!service_unit_name_is_valid("-.service"));
assert_se(!service_unit_name_is_valid(""));
assert_se(!service_unit_name_is_valid("foo.slice"));
assert_se(!service_unit_name_is_valid("@.service"));
assert_se(!service_unit_name_is_valid("@bar.service"));
assert_se(!service_unit_name_is_valid("-@.service"));
}
static void test_slice_name_is_valid(void) {
assert_se( slice_name_is_valid(SPECIAL_ROOT_SLICE));
assert_se( slice_name_is_valid("foo.slice"));
@@ -856,7 +838,6 @@ int main(int argc, char* argv[]) {
test_unit_prefix_is_valid();
test_unit_name_change_suffix();
test_unit_name_build();
test_service_unit_name_is_valid();
test_slice_name_is_valid();
test_build_subslice();
test_build_parent_slice();