Bug 90333 - The unit file "-.slice" should be renamed
Summary: The unit file "-.slice" should be renamed
Status: RESOLVED WONTFIX
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-06 06:23 UTC by Wayne Pollock
Modified: 2015-05-06 15:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Wayne Pollock 2015-05-06 06:23:30 UTC
On Linux, try this:
 cd .../systemd/system
 grep foo *

You will get an error message from grep!  I believe the problem is that the file "-.slice" appears as a bunch of options to grep, and possibly other commands.

Desired action: rename this file to something less error-prone, maybe "0.slice".

Work-around: when in the systemd/system directory, always use "--", as in:
  grep -- foo *
Comment 1 Wayne Pollock 2015-05-06 06:27:20 UTC
I forgot to add, when searching Bugzilla for existing bugs, a search for -.slice was interpreted as "show all bugs not containing ".slice"!  Work-around: search for "-.slice" (with the quotes).

(A dash is a terrible choice as the first character in any file name.)
Comment 2 Lennart Poettering 2015-05-06 15:28:37 UTC
Well, the slices build a tree, similar to a directory tree. 

Example: foo-bar-baz.slice is a child slice of foo-bar.slice. foo-bar.slice is a child slice of foo.slice which is a child slice of -.slice. 

The "-" is used as separator here, the way "/" is used in normal directory paths. A single "/" refers to the root directory, and accordingly a single "-" refers to the root slice...

I see that it is sometimes annoying, if you do not know or use the "--" separator on command lines. However, it's also too late to change this, as this is API already. I also don't see any better character available.

Sorry, but we cannot really change this.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.