Age | Commit message (Collapse) | Author |
|
In user_dirs() in path-lookup.c, I want to replace this:
symlink("../../../.config/systemd/user", data_home);
with
symlink(config_home, data_home);
to avoid hardcoding .config when XDG_CONFIG_HOME is set.
The problem is that config_home is an absolute path, and it's better
to make the symlink relative. path_make_relative() is an utility
function that converts an absolute path into a relative one.
|
|
Modifies find_binary() to accept NULL in the second argument.
fsck.type lookup logic moved to new fsck_exists() function, with a test.
|
|
The conf_files_list family accepts an alternate root path to prefix all
directories in the list but path_strv_canonicalize_uniq doesn't use it.
This results in the suspicious behavior of resolving directory symlinks
based on the contents of / instead of the alternate root.
This adds a prefix argument to path_strv_canonicalize which will now
prepend the prefix, if given, to every path in the list. To avoid
answering what a relative path means when called with a root prefix
path_strv_canonicalize is now path_strv_canonicalize_absolute and only
considers absolute paths. Fortunately all users of already call
path_strv_canonicalize with a list of absolute paths.
|
|
|
|
|
|
The only problem is that libgen.h #defines basename to point to it's
own broken implementation instead of the GNU one. This can be fixed
by #undefining basename.
|
|
I want to use this from a bulitin in a subsequent patch.
|
|
Also add PATH_FOREACH_PREFIX_MORE which includes the specified dir
itself in the iteration
|
|
Syntactic sugar in a macro PATH_FOREACH_PREFIX.
|
|
|
|
I'm assuming that it's fine if a _const_ or _pure_ function
calls assert. It is assumed that the assert won't trigger,
and even if it does, it can only trigger on the first call
with a given set of parameters, and we don't care if the
compiler moves the order of calls.
|
|
This also makes sure we always detect an OS tree the same way, by
checking for /etc/os-release.
|
|
|
|
that work on .d/ directories
This unifies much of the logic behind them:
- All four will now ofllow the rule that the earlier file and earlier
assignment in the .d/ directories wins. Before, sysctl was the only
outlier, where the later setting always won.
- All four now support getopt() and --help on the command line.
- All four can now handle specification of configuration file names on
the command line to apply. The tools will automatically find them, and
apply them. Previously only tmpfiles could do that. This is useful for
%post scripts in RPMs and suchlike.
- This fixes various error path issues in conf_files_list()
|
|
|
|
- Make writing/reading of /etc/timezone dependendent of HAVE_SYSV_COMPAT
- Introduce symlink_atomic() after all, and use it
- Use relative symlink for /etc/localtime
|
|
|
|
|