mirror of
https://github.com/troglobit/finit.git
synced 2026-10-15 10:29:35 +00: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:
1 parent
799e992542
commit
26128dd788
7 files changed
+53
No files matched your search
@@ -84,6 +84,11 @@ static void rtc_save(void *arg)
|
||||
int fd, rc = 0;
|
||||
char tz[128];
|
||||
|
||||
if (rescue) {
|
||||
_d("Skipping %s plugin in rescue mode.", __FILE__);
|
||||
return;
|
||||
}
|
||||
|
||||
fd = rtc_open();
|
||||
if (fd < 0)
|
||||
return;
|
||||
@@ -121,6 +126,11 @@ static void rtc_restore(void *arg)
|
||||
int fd, rc = 0;
|
||||
char tz[128];
|
||||
|
||||
if (rescue) {
|
||||
_d("Skipping %s plugin in rescue mode.", __FILE__);
|
||||
return;
|
||||
}
|
||||
|
||||
fd = rtc_open();
|
||||
if (fd < 0)
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user