shill: --use-flimflam-dirs options switches all shill directories to flimflam's.
Rename the existing --use-flimflam-profiles option to
--use-flimflam-dirs and include the run directory in the set of
directories that get switched. This allows easier command-line switch
between flimflam and shill.
BUG=chromium-os:29630
TEST=tested on device:
stop flimflam
shill --foreground --use-flimflam-dirs
checked that /var/run/flimflam/resolv.conf gets updated
Change-Id: I34d4d4be21cb30f8de8f14538864d40942126b27
Reviewed-on: https://gerrit.chromium.org/gerrit/20451
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/shill_main.cc b/shill_main.cc
index 10e38eb..8331ef6 100644
--- a/shill_main.cc
+++ b/shill_main.cc
@@ -43,8 +43,8 @@
static const char kHelp[] = "help";
// LOG() level. 0 = INFO, 1 = WARNING, 2 = ERROR.
static const char kLogLevel[] = "log-level";
-// Use the same directories flimflam uses for global, user profiles..
-static const char kUseFlimflamProfiles[] = "use-flimflam-profiles";
+// Use the same directories flimflam uses (profiles, run dir...)
+static const char kUseFlimflamDirs[] = "use-flimflam-dirs";
// The help message shown if help flag is passed to the program.
static const char kHelpMessage[] = "\n"
@@ -61,8 +61,8 @@
" LOG() level. 0 = INFO, 1 = WARNING, 2 = ERROR.\n"
" --push=profile1,profile2\n"
" Specify profiles to push on startup.\n"
- " --use-flimflam-profiles\n"
- " Use the same directories flimflam uses for global, user profiles.\n"
+ " --use-flimflam-dirs\n"
+ " Use the same directories flimflam uses (profiles, run dir...).\n"
" --v=N\n"
" Enables VLOG(N) and below.\n"
" --vmodule=\"*file_pattern*=1,certain_file.cc=2\".\n"
@@ -128,8 +128,8 @@
cl->GetSwitchValueASCII(switches::kDefaultConfigDir));
shill::Config config; /* (config_dir, default_config_dir) */
- if (cl->HasSwitch(switches::kUseFlimflamProfiles))
- config.UseFlimflamStorageDirs();
+ if (cl->HasSwitch(switches::kUseFlimflamDirs))
+ config.UseFlimflamDirs();
// TODO(pstew): This should be chosen based on config
// Make sure we delete the DBusControl object AFTER the LazyInstances