* Provide a convience option for commands that must be executed both
when the system boots and when it resumes from suspend. svn path=/nixos/branches/upstart-0.6/; revision=18354
This commit is contained in:
parent
1affc9168e
commit
9174b4ab42
|
@ -12,6 +12,7 @@ let
|
||||||
action="$1"
|
action="$1"
|
||||||
if [ "$action" = "resume" ]; then
|
if [ "$action" = "resume" ]; then
|
||||||
${cfg.resumeCommands}
|
${cfg.resumeCommands}
|
||||||
|
${cfg.powerUpCommands}
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -39,6 +40,17 @@ in
|
||||||
description = "Commands executed after the system resumes from suspend-to-RAM.";
|
description = "Commands executed after the system resumes from suspend-to-RAM.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
powerUpCommands = mkOption {
|
||||||
|
default = "";
|
||||||
|
example = "${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda";
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Commands executed when the machine powers up. That is,
|
||||||
|
they're executed both when the system first boots and when
|
||||||
|
it resumes from suspend or hibernation.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,7 +29,11 @@ let
|
||||||
utillinux
|
utillinux
|
||||||
udev
|
udev
|
||||||
];
|
];
|
||||||
postBootCommands = writeText "local-cmds" config.boot.postBootCommands;
|
postBootCommands = writeText "local-cmds"
|
||||||
|
''
|
||||||
|
${config.boot.postBootCommands}
|
||||||
|
${config.powerManagement.powerUpCommands}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in New Issue