On Sat, Nov 24, 2012 at 6:27 PM, Zenaan Harkness <z...@freedbms.net> wrote: > On 11/25/12, Michael Biebl <bi...@debian.org> wrote: >> On 24.11.2012 14:40, Tom H wrote: >>> On Sat, Nov 24, 2012 at 6:02 AM, Zenaan Harkness <z...@freedbms.net> >>> wrote: >>>> >>>> Any idea how to make use of systemd-hostnamed? >>>> >>>> Eg: >>>> $ sudo /lib/systemd/systemd-hostnamed >>>> Warning: nss-myhostname is not installed. Changing the local hostname >>>> might make it unresolveable. Please install nss-myhostname! >>>> # hang's at this point, apparently indefinitely... >>> >>> What are you expecting it to do? >> >> It doesn't hang. It is a system daemon which just waits sits there and >> waits for requests (via D-Bus). >> >> Nothing unexpected here aside from starting this tool directly. >> >> It would be like starting apache by hand and then wondering that it sits >> there waiting for requests via port 80. > > Thanks for the clarifications. > > $ lighttpd --help > lighttpd: invalid option -- '-' > lighttpd/1.4.31 (ssl) (Jul 14 2012 12:10:48) - a light and fast webserver > usage: > -f <name> filename of the config-file > -m <name> module directory (default: /usr/lib/lighttpd) > -p print the parsed config-file in internal form, and exit > -t test the config-file, and exit > -D don't go to background (default: go to background) > -v show version > -V show compile-time features > -h show this help > > $ /lib/systemd/systemd-hostnamed --help > This program takes no arguments. > > $ man lighttpd > #... > > $ man systemd-hostnamed > No manual entry for systemd-hostnamed > > I guess, being a "boot time" program and possibly headed for > inclusion-in-initrd territory, the intent is to keep "core" daemons as > small as possible, and not encumbered with memory consuming --help > option? > > For discoverability/learnability of such things, should I be saying > "the source code is the man page"? > > Or should I simply ignore all binaries in /lib/ ? > > >From /usr/share/doc/systemd/README, : > "When systemd-hostnamed is used it is strongly recommended to > install nss-myhostname to ensure that in a world of > dynamically changing hostnames the hostname stays resolveable > under all circumstances. In fact, systemd-hostnamed will warn > if nss-myhostname is not installed. Packagers are encouraged to > add a dependency on nss-myhostname to the package that > includes systemd-hostnamed." > > Perhaps the lack of libnss causes the big delays when starting xterm > after changing hostname? > > Ought there be an addition to man hostname, suggesting that updating > hostname with /bin/hostname, and/ or with /etc/hostname edit, should > be accompanied with an address resolvability update to /etc/hosts in > order to avoid long timeouts when starting applications (perhaps just > under X?) ?? > > apropos hostname > man 5 hostname > # still no suggestion that changing hostname may cause resolver delays > man 7 hostname > # this possibly gives a bit of a hint > (please note, I totally forgot about apropos until just now) > > What I am getting at here is the issue of (lack of) discoverability > regarding this hostname-causing-application-startup-delays issue and > how to fix it. > > debian-user is a great fallback. It ought to be possible, when someone > in the future asks a similar question, that we can point the newbie to > say > > man hostname > # and read paragraph 3 > > or say: > > apropos hostname > man 5 hostname > # and read paragraph 3 > > or some such. > > I attempted to discover/solve my problem/annoyance (10+ seconds xterm > startup delays), but was not able to solve the problem with the > references to the systems documentation which I tried, and I don't > seem to see any clarity on this from man 5 or man 7 either. > > I am very grateful for the abundant documentation we have, and would > like to see a little more, if that is a good idea in this case. > > A rough initial draft for an extra paragraph in man 1 hostname or man > 5 hostname: > > WARNING (or CAUTION, or under NOTES ?) > Changing the hostname during runtime, without the new hostname being > resolvable to an ip address can cause delays when starting applications > which are in any way linked to the resolver(5). > This is the case for most(all?) X applications > > Suggestions appreciated, and when we have satisfactory wording, we can > forward the suggestion to hostname-de...@lists.alioth.debian.org, and/ > or create a bug against hostname package? Guidance appreciated.
The latest version of system has hostnamectl and a man page for systemd-hostnamed. Even if you weren't using systemd, you would've had the xterm problem because you removed the standard "127.0.1.1 ..." line from "/etc/hosts", although I'm not sure how xterm would behave with the hostname known by the kernel being different from the one on the "127.0.1.1" line. Anyway, AFAIU, systemd-hostnamed is there to provide an interface for GUIs to change the hostname. At the CLI, "hostname <new-hostname>" (and other changes should the new name have to be persistent) are still the way to go - unless you have a version of systemd with hostnamectl. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=sxhm8wqh+c9o6ufqkzmgvmj4jbkpaqknxhdqc9wbqo...@mail.gmail.com