summaryrefslogtreecommitdiff
path: root/src/backlight
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-10-19 00:46:07 +0200
committerTom Gundersen <teg@jklm.no>2013-10-19 00:46:10 +0200
commit295edddf5a2d884222a26935b40a4e99b924543d (patch)
tree799818f5c67f5442b7878a63264a2b53017a0ea0 /src/backlight
parentefc815a13d4b4cae59045c6a120a6c6f7dac2d7b (diff)
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).
Diffstat (limited to 'src/backlight')
-rw-r--r--src/backlight/backlight.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
index e8cdad61ed..6c00b00d82 100644
--- a/src/backlight/backlight.c
+++ b/src/backlight/backlight.c
@@ -24,6 +24,7 @@
#include "fileio.h"
#include "libudev.h"
#include "udev-util.h"
+#include "util.h"
static struct udev_device *find_pci_or_platform_parent(struct udev_device *device) {
struct udev_device *parent;
@@ -290,7 +291,7 @@ int main(int argc, char *argv[]) {
* device probing should be complete), so that the validity
* check at boot time doesn't have to be reliable. */
- if (streq(argv[1], "load")) {
+ if (streq(argv[1], "load") && restore_state()) {
_cleanup_free_ char *value = NULL;
if (!validate_device(udev, device))