1 |
There are some things I noticed in the tmpfiles_process() function: |
2 |
|
3 |
- `type` currently also checks for functions, alias, and builtins, |
4 |
besides executable files. If that's not intended, the `-P` option |
5 |
should be added. |
6 |
- What happens if neither systemd-tmpfiles nor opentmpfiles is found? |
7 |
- Shouldn't the function return a nonzero if an error occurs? It |
8 |
would help scripts abort. |
9 |
- `[[ ${ROOT} == / ]] || return 0` seems to present a harmless false |
10 |
condition, and it doesn't show an error message. I would be helpful |
11 |
to have a comment added above it to give details why. |
12 |
|
13 |
I also prefer some things this way: |
14 |
|
15 |
- Indent the contents of the first `if` block for consistency's sake, |
16 |
and less confusion. |
17 |
- Patterns in the `case` block doesn't have to be indented. This makes |
18 |
the contents of the `case` block aligned with the contents of the |
19 |
other blocks (`if`, `while`, etc.), and it makes the use of indents at |
20 |
minimum when the block is used recursively. |
21 |
- The subject word in the case block does not have to be quoted. |
22 |
- Always keep blocks isolated from adjacent lines. |
23 |
|
24 |
-- |
25 |
konsolebox |