remove systemd HDD spindown patch

i haven't used this for several months. it doesn't seem to matter, and
maintaining custom systemd patches is very impractical.
This commit is contained in:
colin 2022-11-24 10:28:06 +00:00
parent 1accf264cf
commit 96b3ac26dd
3 changed files with 0 additions and 39 deletions

View File

@ -29,8 +29,6 @@
jackett = prev.callPackage ./jackett { pkgs = prev; };
# mozilla keeps nerfing itself and removing configuration options
firefox-unwrapped = prev.callPackage ./firefox-unwrapped { pkgs = prev; };
# fix abrupt HDD poweroffs as during reboot. patching systemd requires rebuilding nearly every package.
# systemd = import ./pkgs/systemd { pkgs = prev; };
# patch rpi uboot with something that fixes USB HDD boot
ubootRaspberryPi4_64bit = prev.callPackage ./ubootRaspberryPi4_64bit { pkgs = prev; };

View File

@ -1,28 +0,0 @@
diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c
index 2c3cbec02c..8eef305578 100644
--- a/src/shutdown/shutdown.c
+++ b/src/shutdown/shutdown.c
@@ -603,6 +603,7 @@ int main(int argc, char *argv[]) {
execv(args[0], (char * const *) args);
/* execv failed (kexec binary missing?), so try simply reboot(RB_KEXEC) */
+ sleep(15);
(void) reboot(cmd);
_exit(EXIT_FAILURE);
}
@@ -614,6 +615,7 @@ int main(int argc, char *argv[]) {
_fallthrough_;
case RB_AUTOBOOT:
+ sleep(15);
(void) reboot_with_parameter(REBOOT_LOG);
log_info("Rebooting.");
break;
@@ -630,6 +632,7 @@ int main(int argc, char *argv[]) {
assert_not_reached();
}
+ sleep(15);
(void) reboot(cmd);
if (errno == EPERM && in_container) {
/* If we are in a container, and we lacked

View File

@ -1,9 +0,0 @@
{ pkgs }:
(pkgs.systemd.overrideAttrs (upstream: {
patches = (upstream.patches or []) ++ [
# give the HDD time to spin down before abruptly cutting power
./01-spindown-drive.patch
];
}))