The kernel's postinst script already provide a way to prevent hibernation:
# Let programs know not to hibernate if the kernel that would be used for
# resume-from-hibernate is likely to differ from the currently running kernel.
system("mountpoint -q /var/run");
if ($? eq 0) { system("touch /var/run/do-not-hibernate");
}
I therefore think that this bug is actually in the gnome UI and/or the hibernate script, which both ignores the file created by the kernel and allow the user to hibernate the system anyway.
The kernel's postinst script already provide a way to prevent hibernation:
# Let programs know not to hibernate if the kernel that would be used for from-hibernate is likely to differ from the currently running kernel.
system( "touch /var/run/ do-not- hibernate" );
# resume-
system("mountpoint -q /var/run");
if ($? eq 0) {
}
I therefore think that this bug is actually in the gnome UI and/or the hibernate script, which both ignores the file created by the kernel and allow the user to hibernate the system anyway.