aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);