aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
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
Diffstat (limited to 'src')
-rw-r--r--src/main.c7
1 files changed, 7 insertions, 0 deletions
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");