aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-09-07 11:49:54 -0400
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-09-07 11:49:54 -0400
commita14f465d4576bf5895f67c3a7d68d862acda149c (patch)
tree2f66cd6846d123ed1af6bae7646587d8407adb6f
parentUse $(AM_V_GEN) for nicer make output (diff)
downloadopenrc-settingsd-a14f465d4576bf5895f67c3a7d68d862acda149c.tar.gz
openrc-settingsd-a14f465d4576bf5895f67c3a7d68d862acda149c.tar.bz2
openrc-settingsd-a14f465d4576bf5895f67c3a7d68d862acda149c.zip
Add man page and homepage information, and --version support
-rw-r--r--Makefile.am2
-rw-r--r--README10
-rw-r--r--configure.ac2
-rw-r--r--data/openrc-settingsd.867
-rw-r--r--data/org.freedesktop.hostname1.policy2
-rw-r--r--data/org.freedesktop.locale1.policy2
-rw-r--r--data/org.freedesktop.timedate1.policy2
-rw-r--r--src/main.c7
8 files changed, 86 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index 0802620..bdfb3dd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -60,6 +60,8 @@ data/init.d/openrc-settingsd : data/init.d/openrc-settingsd.in
%.service : %.service.in
$(do_subst) < $(srcdir)/$< > $(srcdir)/$@
+dist_man_MANS = data/openrc-settingsd.8
+
AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
diff --git a/README b/README
index e279f16..344fea5 100644
--- a/README
+++ b/README
@@ -1,10 +1,12 @@
-openrc-settingsd provides an implementation of the the hostnamed, localed,
+OpenRC-settingsd provides an implementation of the the hostnamed, localed,
and timedated D-Bus services for OpenRC-based systems - in particular, for
typical installations of Gentoo Linux.
It is maintained by Gentoo's GNOME desktop team, which can be contacted
via gnome@gentoo.org, or in #gentoo-desktop on Freenode IRC.
+Homepage: http://gnome.gentoo.org/openrc-settingsd.xml
+
Bugs should be reported to Gentoo Bugzilla (https://bugs.gentoo.org/)
using "GNOME" as the component.
@@ -50,10 +52,10 @@ Timedated:
The timezone is set in /etc/timezone and /etc/localtime.
- openrc-settingsd attempts to auto-detect an appropriate ntp implementation.
+ OpenRC-settingsd attempts to auto-detect an appropriate ntp implementation.
To avoid auto-detection, use the --ntp-service command line option.
-Note that openrc-settingsd expects any shell-syntax settings files that it
+Note that OpenRC-settingsd expects any shell-syntax settings files that it
modifies to be in UTF-8 encoding, and to consist only of comments and simple
scalar assignments, i.e. something like
@@ -61,5 +63,5 @@ scalar assignments, i.e. something like
foo="bar"
baz='Let'\''s go!'
-If openrc-settingsd fails to parse a settings file, it will refuse to modify
+If OpenRC-settingsd fails to parse a settings file, it will refuse to modify
it.
diff --git a/configure.ac b/configure.ac
index a7ccb04..3e0480a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ([2.60])
-AC_INIT([openrc-settingsd], [0])
+AC_INIT([openrc-settingsd], [0], [https://bugs.gentoo.org/], [openrc-settingsd], [http://gnome.gentoo.org/openrc-settingsd.xml])
AC_CONFIG_SRCDIR([src/main.c])
AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz])
AC_PROG_CC_STDC
diff --git a/data/openrc-settingsd.8 b/data/openrc-settingsd.8
new file mode 100644
index 0000000..6e4666c
--- /dev/null
+++ b/data/openrc-settingsd.8
@@ -0,0 +1,67 @@
+.TH "OPENRC-SETTINGSD" "8" "September 2012" "OpenRC-settingsd" "openrc-settingsd"
+.SH "NAME"
+openrc\-settingsd \- system settings D\-Bus service for OpenRC
+.SH "SYNOPSIS"
+\fBopenrc\-settingsd\fR [\fB\-\-help\fR] [\fB\-\-debug\fR] [\fB\-\-read\-only\fR]
+[\fB\-\-foreground\fR] [\fB\-\-update\-rc\-status\fR] [\fB\-\-ntp\-service\fR=\fISERVICE\fR]
+.SH "DESCRIPTION"
+.PP
+The \fBopenrc\-settingsd\fR daemon implements the standard hostnamed (i.e.
+\fIorg.freedesktop.hostname1\fR), localed (i.e. \fIorg.freedesktop.locale1\fR), and
+timedated (\fIorg.freedesktop.timedate1\fR) D\-Bus interfaces for OpenRC systems.
+Users and administrators should not need to launch the \fBopenrc\-settingsd\fR
+executable manually. Depending on the installation, it will either be launched
+automatically via D\-Bus activation when needed, or started by the administrator
+as an OpenRC service using \fI/etc/init.d/openrc\-settingsd\fR.
+.SH "OPTIONS"
+.PP
+\fB\-\-help\fR
+.RS 4
+Show help options.
+.RE
+.PP
+\fB\-\-debug\fR
+.RS 4
+Enable debugging messages. Not recommended unless in foreground mode.
+.RE
+.PP
+\fB\-\-read\-only\fR
+.RS 4
+Run daemon in read-only mode. It will read settings files, but will not
+modify them.
+.RE
+.PP
+\fB\-\-foreground\fR
+.RS 4
+Run in foreground mode (i.e. not daemonized). Messages will be logged to stderr
+instead of the system log.
+.RE
+.PP
+\fB\-\-update\-rc\-status\fR
+.RS 4
+Automatically set the status of the \fIopenrc\-settingsd\fR service to \fIstarted\fR
+when the daemon successfully starts, and to \fIstopped\fR when the daemon stops. If
+\fBopenrc\-settingsd\fR is manually launched with this argument, the administrator
+will be able to stop it via \fI/etc/init.d/openrc\-settingsd\fR\ \fIstop\fR.
+.RE
+.PP
+\fB\-\-ntp\-service\fR=\fISERVICE\fR
+.RS 4
+Specify which OpenRC service to use as the NTP service. If this option is not used,
+\fBopenrc\-settingsd\fR will attempt to autodetect an appropriate ntp implementation.
+.RE
+.SH "AUTHORS"
+.PP
+Written by
+.MT tetromino@gentoo.org
+Alexandre Rostovtsev
+.ME .
+.SH "BUGS"
+.PP
+Bug reports should be submitted to the
+.UR https://bugs.gentoo.org/
+Gentoo Bugzilla
+.UE ; use \fIGNOME\fR as the component.
+.SH "SEE ALSO"
+.PP
+\fBdbus\-daemon\fR(1), \fBpolkit\fR(8), \fBrc\fR(8) \ No newline at end of file
diff --git a/data/org.freedesktop.hostname1.policy b/data/org.freedesktop.hostname1.policy
index 74851e2..4717ce1 100644
--- a/data/org.freedesktop.hostname1.policy
+++ b/data/org.freedesktop.hostname1.policy
@@ -3,7 +3,7 @@
<policyconfig>
<vendor>Gentoo Linux</vendor>
- <vendor_url>http://git.overlays.gentoo.org/gitweb/?p=proj/openrc-settingsd.git</vendor_url>
+ <vendor_url>http://www.gentoo.org/proj/en/desktop/gnome/openrc-settingsd.xml</vendor_url>
<action id="org.freedesktop.hostname1.set-hostname">
<description>Set local host name</description>
diff --git a/data/org.freedesktop.locale1.policy b/data/org.freedesktop.locale1.policy
index e56cc74..640ea39 100644
--- a/data/org.freedesktop.locale1.policy
+++ b/data/org.freedesktop.locale1.policy
@@ -3,7 +3,7 @@
<policyconfig>
<vendor>Gentoo Linux</vendor>
- <vendor_url>http://git.overlays.gentoo.org/gitweb/?p=proj/openrc-settingsd.git</vendor_url>
+ <vendor_url>http://www.gentoo.org/proj/en/desktop/gnome/openrc-settingsd.xml</vendor_url>
<action id="org.freedesktop.locale1.set-locale">
<description>Set system locale environment variables</description>
diff --git a/data/org.freedesktop.timedate1.policy b/data/org.freedesktop.timedate1.policy
index 9bc276b..fafafed 100644
--- a/data/org.freedesktop.timedate1.policy
+++ b/data/org.freedesktop.timedate1.policy
@@ -3,7 +3,7 @@
<policyconfig>
<vendor>Gentoo Linux</vendor>
- <vendor_url>http://git.overlays.gentoo.org/gitweb/?p=proj/openrc-settingsd.git</vendor_url>
+ <vendor_url>http://www.gentoo.org/proj/en/desktop/gnome/openrc-settingsd.xml</vendor_url>
<action id="org.freedesktop.timedate1.set-time">
<description>Set system time</description>
diff --git a/src/main.c b/src/main.c
index 8374218..78b6013 100644
--- a/src/main.c
+++ b/src/main.c
@@ -42,6 +42,7 @@ static gboolean foreground = FALSE;
static gboolean use_syslog = FALSE;
static gboolean read_only = FALSE;
static gboolean update_rc_status = FALSE;
+static gboolean print_version = FALSE;
static gchar *ntp_preferred_service = NULL;
static guint components_started = 0;
@@ -56,6 +57,7 @@ static GOptionEntry option_entries[] =
{ "read-only", 0, 0, G_OPTION_ARG_NONE, &read_only, "Run in read-only mode", NULL },
{ "ntp-service", 0, 0, G_OPTION_ARG_STRING, &ntp_preferred_service, "Preferred rc NTP service for timedated", NULL },
{ "update-rc-status", 0, 0, G_OPTION_ARG_NONE, &update_rc_status, "Force openrc-settingsd rc service to be marked as started", NULL },
+ { "version", 0, 0, G_OPTION_ARG_NONE, &print_version, "Show version information", NULL },
{ NULL }
};
@@ -209,6 +211,11 @@ main (gint argc, gchar *argv[])
return 1;
}
+ if (print_version) {
+ g_print ("%s\n", PACKAGE_STRING);
+ return 0;
+ }
+
if (!foreground) {
if (daemon_retval_init () < 0) {
g_critical ("Failed to create pipe");