summaryrefslogtreecommitdiffstats
path: root/src/hostname (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: implement new log control API dbus interface in all our daemonsLennart Poettering2020-04-211-0/+5
|
* hostnamed: add dbus parameter namesZbigniew Jędrzejewski-Szmek2020-04-121-8/+58
|
* shared: split out polkit stuff from bus-util.c → bus-polkit.cLennart Poettering2020-01-221-1/+1
| | | | | | It's enough, complex stuff to warrant its own source file. No other changes, just splitting out.
* tree-wide: clean up --help texts a bitLennart Poettering2019-11-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleans up and unifies the outut of --help texts a bit: 1. Highlight the human friendly description string, not the command line via ANSI sequences. Previously both this description string and the brief command line summary was marked with the same ANSI highlight sequence, but given we auto-page to less and less does not honour multi-line highlights only the command line summary was affectively highlighted. Rationale: for highlighting the description instead of the command line: the command line summary is relatively boring, and mostly the same for out tools, the description on the other hand is pregnant, important and captions the whole thing and hence deserves highlighting. 2. Always suffix "Options" with ":" in the help text 3. Rename "Flags" → "Options" in one case 4. Move commands to the top in a few cases 5. add coloring to many more help pages 6. Unify on COMMAND instead of {COMMAND} in the command line summary. Some tools did it one way, others the other way. I am not sure what precisely {} is supposed to mean, that uppercasing doesn't, hence let's simplify and stick to the {}-less syntax And minor other tweaks.
* tree-wide: drop string.h when string-util.h or friends are includedYu Watanabe2019-11-031-1/+0
|
* Highlight the synopsis and summary in --helpZbigniew Jędrzejewski-Szmek2019-10-081-2/+5
| | | | | This doesn't cover all the binaries, but I don't know how to script this, and I run out of steam ;)
* Move the Commands section above Options sectionZbigniew Jędrzejewski-Szmek2019-10-081-9/+10
| | | | | | | For executables which take a verb, we should list the verbs first, and then options which modify those verbs second. The general layout of the man page is from general description to specific details, usually Overview, Commands, Options, Return Value, Examples, References.
* Generate stable machine-id and DHCP client ID on POWER KVM.Dimitri John Ledkov2019-08-311-0/+2
|
* tree-wide: get rid of strappend()Lennart Poettering2019-07-121-2/+2
| | | | | It's a special case of strjoin(), so no need to keep both. In particular as typing strjoin() is even shoert than strappend().
* Enable log colors for most of tools in /usr/binZbigniew Jędrzejewski-Szmek2019-05-081-0/+1
| | | | | | | | | | When emitting the calendarspec warning we want to see some color. Follow-up for 04220fda5c. Exceptions: - systemctl, because it has a lot hand-crafted coloring - tmpfiles, sysusers, stdio-bridge, etc, because they are also used in services and I'm not sure if this wouldn't mess up something.
* headers: remove unneeded includes from util.hZbigniew Jędrzejewski-Szmek2019-03-271-0/+2
| | | | | This means we need to include many more headers in various files that simply included util.h before, but it seems cleaner to do it this way.
* util: split out nulstr related stuff to nulstr-util.[ch]Lennart Poettering2019-03-141-0/+1
|
* Merge pull request #11086 from poettering/nscd-cache-flushZbigniew Jędrzejewski-Szmek2018-12-171-0/+3
|\ | | | | flush nscd's caches when we register user/groups/hostnames
| * hostnamed: always flush nscd cache when changing hostnameLennart Poettering2018-12-151-0/+3
| | | | | | | | This way we know that nss-myhostname always serves the correct answer.
* | hostnamed: filter out all-zero and all-0xFF DMI ProductUUIDsLennart Poettering2018-12-151-2/+6
|/ | | | | These UUIDs are considered as wildcard value for "unset" UUIDs typically, and this even makes sense. Let's suppress them hence.
* util: drop missing.h from util.hYu Watanabe2018-12-041-0/+1
|
* util-lib: split out env file parsing code into env-file.cLennart Poettering2018-12-021-0/+2
| | | | | | It's quite complex, let's split this out. No code changes, just some file rearranging.
* util-lib: don't include fileio.h from fileio-label.hLennart Poettering2018-12-021-0/+1
| | | | There's no reason for doing that, hence simply don't.
* Split out pretty-print.c and move pager.c and main-func.h to shared/Zbigniew Jędrzejewski-Szmek2018-11-201-1/+1
| | | | | This is high-level functionality, and fits better in shared/ (which is for our executables), than in basic/ (which is also for libraries).
* hostnamed: use DEFINE_MAIN_FUNCTION() macroYu Watanabe2018-11-201-30/+19
| | | | This also renames context_free() to context_clear().
* log: introduce new helper call log_setup_service()Lennart Poettering2018-11-201-3/+1
| | | | | Let's reduce the common boilerplate and have a single setup function used by all service code to setup logging.
* util-lib: move main() definition macros to its own header fileLennart Poettering2018-11-191-0/+1
| | | | | | | | | This way, we can extend the macro a bit with stuff pulled in from other headers without this affecting everything which pulls in macro.h, which is one of our most basic headers. This is just refactoring, no change in behaviour, in prepartion for later changes.
* hostnamectl: define main through macroZbigniew Jędrzejewski-Szmek2018-11-171-10/+7
|
* fileio: automatically add NULL sentinel to parse_env_file()Lennart Poettering2018-11-141-2/+1
| | | | Let's modernize things a bit.
* fileio: drop "newline" parameter for env file parsersLennart Poettering2018-11-141-2/+2
| | | | | | | Now that we don't (mis-)use the env file parser to parse kernel command lines there's no need anymore to override the used newline character set. Let's hence drop the argument and just "\n\r" always. This nicely simplifies our code.
* hostnamed,localed,timedate: properly propagate errors from sd_event_add_signal()Lennart Poettering2018-11-121-4/+8
| | | | main() can't doesn't expect negative error codes as return.
* Merge pull request #9406 from yuwata/rfe-9228Zbigniew Jędrzejewski-Szmek2018-08-232-0/+60
|\ | | | | | | Trivial conflict solved in merge and include net/if_arp.h added.
| * hostname: expose product UUID on busYu Watanabe2018-08-082-0/+60
| |
* | tree-wide: add clickable man page link to all --help textsLennart Poettering2018-08-201-1/+11
|/ | | | | | | | | | This is a bit like the info link in most of GNU's --help texts, but we don't do info but man pages, and we make them properly clickable on terminal supporting that, because awesome. I think it's generally advisable to link up our (brief) --help texts and our (more comprehensive) man pages a bit, so this should be an easy and straight-forward way to do it.
* tree-wide: shorten error logging a bitYu Watanabe2018-08-071-2/+3
| | | | Continuation of 4027f96aa08c73f109aa46b89842ca0e25c9c0e9.
* hostname: set sd_event_add_signal()Yu Watanabe2018-07-201-1/+12
|
* Drop my copyright headersZbigniew Jędrzejewski-Szmek2018-06-141-2/+0
| | | | | | | perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-06-141-1/+1
| | | | | | Let's unify an beautify our remaining copyright statements, with a unicode ©. This means our copyright statements are now always formatted the same way. Yay.
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-142-6/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-144-8/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* os-util: add helpers for finding /etc/os-releaseLennart Poettering2018-05-241-12/+6
| | | | | Place this new helpers in a new source file os-util.[ch], and move the existing and related call path_is_os_tree() to it as well.
* fileio: accept FILE* in addition to path in parse_env_file()Lennart Poettering2018-05-241-3/+3
| | | | | | | Most our other parsing functions do this, let's do this here too, internally we accept that anyway. Also, the closely related load_env_file() and load_env_file_pairs() also do this, so let's be systematic.
* hostname: use free_and_strdup()Yu Watanabe2018-05-151-48/+28
| | | | | Also, this makes hostnamed check the input strings before bus_verify_polkit_async().
* tree-wide: use strv_free_and_replace() macroYu Watanabe2018-05-091-2/+1
|
* hoestnamed: Also parse HOME_URL from /usr/lib/os-release (#8779)Mario Limonciello2018-04-231-0/+1
| | | | 64928aa54520b8cad3cda14d7aab0f4f59409acf added parsing to /etc/os-release.
* hostnamectl: make the distribution name a pretty clickable link if we canLennart Poettering2018-04-191-2/+14
|
* hostnamed: expose HOME_URL os-release field on the busLennart Poettering2018-04-191-0/+3
|
* tree-wide: drop spurious newlines (#8764)Lennart Poettering2018-04-191-1/+0
| | | | | | | | Double newlines (i.e. one empty lines) are great to structure code. But let's avoid triple newlines (i.e. two empty lines), quadruple newlines, quintuple newlines, …, that's just spurious whitespace. It's an easy way to drop 121 lines of code, and keeps the coding style of our sources a bit tigther.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-063-39/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* tree-wide: use TAKE_PTR() and TAKE_FD() macrosYu Watanabe2018-04-051-2/+1
|
* bus-util: add flags for bus_map_all_properties() (#8546)Yu Watanabe2018-03-281-0/+2
| | | | | | | | | This adds flags BUS_MAP_STRDUP and BUS_MAP_BOOLEAN_AS_BOOL. If BUS_MAP_STRDUP is set, then each "s" message is duplicated. If BUS_MAP_BOOLEAN_AS_BOOL is set, then each "b" message is written to a bool pointer. Follow-up for #8488. See https://github.com/systemd/systemd/pull/8488#discussion_r175816270.
* bus-util: make bus_map_all_properties() not copy stringYu Watanabe2018-03-191-35/+23
|
* hostnamectl: use dispatch_verb()Yu Watanabe2018-03-191-105/+32
|
* meson: drop unnecessary "transformation" of policy filesZbigniew Jędrzejewski-Szmek2018-02-162-6/+1
| | | | | Those files don't contain any @variables@, so the configuration step was just copying them to build/. Let's avoid that, and fix their suffixes while at it.
* Gettextize policy filesGunnar Hjalmarsson2018-02-162-12/+10
| | | | | | | * Don't merge translations into the files * Add gettext-domain="systemd" to description and message Closes #8162, replaces #8118.