mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-08 21:17:47 +03:00
hibernate-resume: refuse to run outside of an initrd
This commit is contained in:
parent
202aea456d
commit
ac528e3e3b
@ -46,6 +46,10 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
umask(0022);
|
||||
|
||||
/* Refuse to run unless we are in an initrd() */
|
||||
if (!in_initrd())
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
device = argv[1];
|
||||
|
||||
if (stat(device, &st) < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user