aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-02-05 03:35:50 -0500
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-02-05 03:36:23 -0500
commitffefb55a4a1bc00bceaa1ba477cf1db3e8635589 (patch)
tree26aeea6037253ce51a3c460b319bfb22782eeaad
parentBetter variable names (diff)
downloadopenrc-settingsd-ffefb55a4a1bc00bceaa1ba477cf1db3e8635589.tar.gz
openrc-settingsd-ffefb55a4a1bc00bceaa1ba477cf1db3e8635589.tar.bz2
openrc-settingsd-ffefb55a4a1bc00bceaa1ba477cf1db3e8635589.zip
Add --read-only flag
-rw-r--r--TODO2
-rw-r--r--src/main.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/TODO b/TODO
index 62ec523..d6bebd9 100644
--- a/TODO
+++ b/TODO
@@ -7,8 +7,6 @@ document that this case is not supported?
Write an init.d file to read RC_SYS so that we can piggyback on openrc's
built-in virtualization detection.
-Add command-line arguments (e.g. --no-hostnamed --readonly-localed).
-
Implement localed and timedated.
Do something about runtime dependency on systemd's org.freedesktop.hostname1.policy,
diff --git a/src/main.c b/src/main.c
index 7463fd3..9212eb6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -30,10 +30,12 @@
#define DEFAULT_LEVELS (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE)
static gboolean debug = FALSE;
+static gboolean read_only = FALSE;
static GOptionEntry option_entries[] =
{
{ "debug", 0, 0, G_OPTION_ARG_NONE, &debug, "Enable debugging messages", NULL },
+ { "read-only", 0, 0, G_OPTION_ARG_NONE, &read_only, "Run in read-only mode", NULL },
{ NULL }
};
@@ -65,7 +67,7 @@ main (gint argc, gchar *argv[])
}
shell_utils_init ();
- hostnamed_init (FALSE);
+ hostnamed_init (read_only);
loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (loop);