Commit graph

24 commits

Author SHA1 Message Date
Lennart Poettering 9f6445e34a log: log_error() and friends add a newline after each line anyway, so avoid including it in the log strings 2013-12-24 16:39:37 +01:00
Zbigniew Jędrzejewski-Szmek 2b6bf07dd2 Get rid of our reimplementation of basename
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.
2013-12-06 21:29:55 -05:00
Lennart Poettering 4087cb9e8f path-util: paths_check_timestamp() opimizations 2013-11-06 17:34:54 +01:00
Tom Gundersen 97f2d76d4f path_check_timestamp: only keep the most recent timestamp
There is no point in keeping one timestamp for each directory, as we only
ever care about the most recent one.
2013-10-29 16:12:11 +01:00
Tom Gundersen 8e18485284 udev: move udev_rules_check_timestamp to shared
I want to use this from a bulitin in a subsequent patch.
2013-10-26 14:34:31 +02:00
Zbigniew Jędrzejewski-Szmek 4bcc8c3cb5 Fix two compiler warnings 2013-09-09 17:35:52 -04:00
Zbigniew Jędrzejewski-Szmek c9d954b27e run: allow non-absolute paths as command 2013-09-09 13:49:30 -04:00
Zbigniew Jędrzejewski-Szmek 116cc02874 path-util.c: small modernization 2013-09-09 13:49:30 -04:00
Zbigniew Jędrzejewski-Szmek 11f22867f9 time-dst: use _cleanup_ 2013-05-02 22:55:38 -04:00
Lennart Poettering 6606089752 path-util: unify code for detecting OS trees
This also makes sure we always detect an OS tree the same way, by
checking for /etc/os-release.
2013-04-16 05:47:04 +02:00
Lennart Poettering fabe5c0e5f binfmt,tmpfiles,modules-load,sysctl: rework the various early-boot services 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()
2013-02-11 23:54:30 +01:00
Lennart Poettering 91a6489d99 path-util: fix memory leak 2013-02-11 05:10:23 +01:00
Zbigniew Jędrzejewski-Szmek 0783951b93 shared: remove now unused function 2013-02-06 23:16:17 -05:00
Zbigniew Jędrzejewski-Szmek 874310b7b6 systemd: do not remove empty paths from unit lookup path
The ability to start a new unit with 'systemctl start ...' should not
depend on whether there are other units in the directory. Previously,
an additional 'systemctl daemon-reload' would be necessary to tell
systemd to update the list of unit lookup paths.
2013-02-06 23:16:16 -05:00
Michal Sekletar c9c7aef24f path-util: set pointer to null after calling free()
In cases where path_strv_canonicalize() returns NULL, strv_free() is
called afterwards and it will call free() on pointers which were freed
already in path_strv_canonicalize()
2012-12-17 11:41:31 +01:00
Lennart Poettering 424a19f8a2 timedate: assorted improvements
- 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
2012-09-14 20:02:52 +02:00
Mantas Mikulėnas fa125f4e44 path-util: fall back to stat() if kernel does not support name_to_handle_at()
Fixes instant hang on kernels that do not have CONFIG_FHANDLE enabled.
2012-09-10 09:21:24 +02:00
Mantas Mikulėnas 8ac7549330 path-util: do not fail in path_is_mountpoint() if path doesn't exist
This was accidentally lost in commit 1640a0b6b0.
2012-09-10 09:21:10 +02:00
Lennart Poettering f408b8f1bb path: fix invalid variable access in path_is_mount_point() 2012-09-04 17:05:23 -07:00
Lennart Poettering 1640a0b6b0 path-util: in path_is_mount_point() fall back to the classic stat() test if fs does not support name_to_handle_at() 2012-09-04 16:37:57 -07:00
Lennart Poettering a8348796c0 missing: define name_to_handle_at on our own if it is missing 2012-09-04 15:30:24 -07:00
Lennart Poettering cde9cb343a util: make path_is_mount_point() recognize bind mounts, too 2012-09-03 18:59:05 -07:00
Lennart Poettering b7def68494 util: rename join() to strjoin()
This is to match strappend() and the other string related functions.
2012-07-13 13:41:01 +02:00
Kay Sievers 9eb977db5b util: split-out path-util.[ch] 2012-05-08 02:33:10 +02:00