From 295edddf5a2d884222a26935b40a4e99b924543d Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sat, 19 Oct 2013 00:46:07 +0200 Subject: kerne-command-line: introduce option 'systemd.restore_state' When set to 0 this will stop tools like the backlight and rfkill tools to restore state from previous boot. This is useful in case the stored state is bogus to the extent that it is preventing you from resetting it (e.g., the backlight settings cause the screen to be off on boot on a system where the backlight can not be adjusted directly from the keyboard). --- src/rfkill/rfkill.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rfkill') diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c index 812cf408fb..b814e5c5fc 100644 --- a/src/rfkill/rfkill.c +++ b/src/rfkill/rfkill.c @@ -24,6 +24,7 @@ #include "fileio.h" #include "libudev.h" #include "udev-util.h" +#include "utils.h" int main(int argc, char *argv[]) { _cleanup_udev_unref_ struct udev *udev = NULL; @@ -95,7 +96,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - if (streq(argv[1], "load")) { + if (streq(argv[1], "load") && restore_state()) { _cleanup_free_ char *value = NULL; r = read_one_line_file(saved, &value); -- cgit v1.2.3-54-g00ecf