diff options
author | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-09-07 11:49:54 -0400 |
---|---|---|
committer | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-09-07 11:49:54 -0400 |
commit | a14f465d4576bf5895f67c3a7d68d862acda149c (patch) | |
tree | 2f66cd6846d123ed1af6bae7646587d8407adb6f /src | |
parent | Use $(AM_V_GEN) for nicer make output (diff) | |
download | openrc-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.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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"); |