nixos/rke2: modify the systemd unit name to be consistent with the upstream

remove `fix-systemd-unit-name.patch`.
This commit is contained in:
Mogeko 2024-06-21 10:50:41 +08:00
parent aaac31c8a4
commit 7f6cd3837d
No known key found for this signature in database
GPG Key ID: 4089B828704223E7
3 changed files with 1 additions and 18 deletions

View File

@ -241,7 +241,7 @@ in
"kernel.panic_on_oops" = 1;
};
systemd.services.rke2 = {
systemd.services."rke2-${cfg.role}" = {
description = "Rancher Kubernetes Engine v2";
documentation = [ "https://github.com/rancher/rke2#readme" ];
after = [ "network-online.target" ];

View File

@ -44,9 +44,6 @@ buildGoModule rec {
lvm2 # dmsetup
];
# Patch the systemd unit name to be `rke2.service`.
patches = [ ./fix-systemd-unit-name.patch ];
# See: https://github.com/rancher/rke2/blob/e7f87c6dd56fdd76a7dab58900aeea8946b2c008/scripts/build-binary#L27-L38
ldflags = [
"-w"

View File

@ -1,14 +0,0 @@
diff --git a/bundle/bin/rke2-killall.sh b/bundle/bin/rke2-killall.sh
index 1099ad90..db8a7ea9 100755
--- a/bundle/bin/rke2-killall.sh
+++ b/bundle/bin/rke2-killall.sh
@@ -54,8 +54,7 @@ export PATH=$PATH:/var/lib/rancher/rke2/bin
set -x
-systemctl stop rke2-server.service || true
-systemctl stop rke2-agent.service || true
+systemctl stop rke2.service || true
killtree $({ set +x; } 2>/dev/null; getshims; set -x)