mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
plugins: skip plugin in rescue mode
These plugins should not run in rescue mode, because the system may be in a very bad state and we do not want to make the situation any worse than it already is. Essentially, only services in rescue.conf should run in rescue mode. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -30,6 +30,11 @@
|
||||
|
||||
static void save(void *arg)
|
||||
{
|
||||
if (rescue) {
|
||||
_d("Skipping %s plugin in rescue mode.", __FILE__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (whichp(ALSACTL)) {
|
||||
_d("Saving sound settings ...");
|
||||
run_interactive(ALSACTL " -g store", "Saving sound settings");
|
||||
@@ -38,6 +43,11 @@ static void save(void *arg)
|
||||
|
||||
static void restore(void *arg)
|
||||
{
|
||||
if (rescue) {
|
||||
_d("Skipping %s plugin in rescue mode.", __FILE__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (whichp(ALSACTL)) {
|
||||
_d("Restoring sound settings ...");
|
||||
run_interactive(ALSACTL " -g restore", "Restoring sound settings");
|
||||
|
||||
Reference in New Issue
Block a user