| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
it runs during init and acts just like like icon/chassis/uname(3)
functions work
|
| |
|
|
|
|
|
| |
sethostname now works, cleans up after itself properly and
cleans/checks incoming data before trying to sethostname(3).
|
| |
|
| |
|
| |
|
|
|
|
|
| |
fill out remaining properties for hostnamed, which can be easily found
through uname(3) calls.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
import landry's upower function to detect laptop-ness
check arch if sparc*/hppa to detect server-ness
connect functionality to DBus side of things
|
|
|
|
|
|
| |
icon/chassis is now set once during init and then referred to afterwords.
replaced string array with nice struct, added clear instructions.
added virtualization give-aways from my research + icon names (xdg)
|
|
|
|
| |
hostnamed checks sysctl output for known vm indicators
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
dynamic hostname (sometimes just hostname) is always whatever
the gethostname(3) returns.
static hostname is derived from prettyhostname, which attempts to
convert it to a 7 bit ascii hostname (no bookend -'s, etc.) if this
fails or prettyhostname has not yet been set, defaults to gethostname(3).
prettyhostname is whatever is in /etc/systemd_compat.conf, if reading that
fails it is just an empty string. prettyhostname is blank until manually set.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
main() now sets the signal handlers (via function from previous
commit) before establishing the GMainLoop as well as invoke the
proper clean()'s after unref'ing the loop. at this point all four
interfaces are at the same place structurally. builds all cases.
|
|
|
|
|
|
|
| |
this function calls attached the ones from the previous commit to the
GLib runtime properly. since we are working solely in the default context
(in terms on the GMainLoop) we are guaranteed the attached functions will
only run once.
|
|
|
|
|
|
|
|
| |
it prints a message and calls foo_mem_clean(), swiftly and safely
bringing the runtime down before letting the calling thread it was
ready to exit. note, this is handled through GLib which guarantees
it is only fired once, rather than unwrapped signals that can occur
wildly.
|
|
|
|
|
|
|
|
|
|
| |
mem_clean functions previously free()'d our pointer array without
first checking that the name/interface had properly been unexported from
dbus. checking first better guarantees all operations implicating that date
have ceased, and that it is safe to go ahead and stop the GMainLoop before
immediately returning. this causes the code just after the main_loop_begin()
call to start functioning, in our case the actual free() calls (which are now
*absolutley* safe to call)
|
|
|
|
|
|
|
|
|
| |
work that was previously done in foo_on_name_acquired(), such as attaching
the interface to the name, is now done in foo_on_bus_acquired(), as GIO docs
suggest. this fixed a bug with logind failing to export, the name_acquired function
executed executed too late to export a big interface like logind.
fix some minor error msg/consistency stuff in hostnamed, merge across pals. builds
|
|
|
|
|
|
| |
minor variable placement changes. added gboolean dbus_interface_exported,
which due to the guarantees of the name_lost, bus_acquired, and name_acquired
is a reliable source of whether not it is reasonable to try and unexport it
|
|
|
|
| |
minor, builds
|
|
|
|
| |
nessecary for compiler unambiguity. minor, builds
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this unusually dense commit is the product of me using hostnamed as a
prototyping bed, you should instead follow the next numbered series of
commits to proceed this one, as they are the same changes but made
incrementally and gradually across the other three interfaces.
added:
* proper lifetime handling, everything coordinated in a gmainloop such that
daemons don't clean their memory twice or trip over the last instance's unclosed
file descriptors, etc.
* threadsafe unix termination signal handling
* more intuitive runtime, daemons immidietly either start up perfectly and print
a verification or crash and print a reason/probable solution
* some bugfixes detailed in further individual commits
|
| |
|
| |
|
|
|
|
|
| |
it's a good idea to use glib signal handling, most use cases will
be running gnome
|
|
|
|
|
|
| |
genfiles (-gen.{c,h}) should be generated at build time instead of
being included in the repo. remove them & add relevant recipes/pre-reqs
include genfiles in 'clean' recipe
|
|
|
|
|
| |
they now start up and display the proper methods/functions on the
system bus, albeit with no functionality
|
|
|
|
| |
also initializes pointer array properly, no more GLib warnings
|
|
|
|
|
|
|
| |
fix minor memory management issues in hostnamed.c. localed.c
was previously based on a version of hostnamed.c i copied,
however it has strayed too far away from the working version
and must be recopied/refactored.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
rewrite scripts/gen-gdbus-interfaces.sh to use ksh (#!/bin/sh) to cut
down on inbox spam, also fixed prior bug where generated files had bad
paths in their #includes. removed namespacing option from gdbus-codegen
as linked objects do not run into naming conflicts as the previous
commits did. regenerate all genfiles (src/interfaces/foo/foo-gen.{c.h})
accordingly.
|
| |
|
|
|
|
|
|
|
| |
no need to include foo-gen.c as its functionality exists inside linked object
built by makefile in future commit. additionally, make all non-generated
interface files executable with a dummy main() that runs foo_init() after
setting everything up properly with a g_main_loop
|
|
|
|
|
|
| |
previously you needed to edit genfiles as to not re-implement
boilerplate methods. linking (instead of #include'ing) avoids this
and allows genfiles to work without edit, as intended.
|
| |
|
| |
|
|
|
|
| |
for building and installing standalone interface binaries, a little documentation and preproccessor logic
|
|
|
|
| |
functionality (2) modify gen-gdbus-interfaces to exclude object manager functionality (3) make localed skeleton (4) namespace hostnamed's and localed's bus/name functions properly (5) edit main.c to init localed
|
|
|
|
| |
accordingly
|
|
|
|
| |
proper namespace changes, fix hostnamed.c accordingly
|
|
|
|
|
|
| |
(2) regenerate hostnamed genfiles accordingly
(3) add in skeleton functions for handling hostnamed properties.
(4) celebrate, as hostnamed.c now serves as a copyable skeleton for the other three
|
|
|
|
|
| |
(2) implemented skeleton functions for hostnamed, attached to interface which is now
(3) exported on DBus properly as a generated GDBusInterfaceSkeleton
|
| |
|
|
|
|
| |
truncating the terminating byte on systems that handle gethostname() poorly
|
| |
|
|
|
|
| |
config IO/install, cleaned up code all-around to work with strict compiler flags
|
|
|
|
| |
generated interfaces, clean up code, conform better to GLib, bring in gio-unix-2.0
|
|
|
|
| |
interface code
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
config file to be more secure..
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
comments
|
|
|
|
| |
method return type from void -> GError
|
|
|