modify sshd units

(cherry picked from commit 19b68dad29de98250ec2b7063ad8e7493d7ec6df)
This commit is contained in:
Yangyang Shen 2023-06-27 20:04:00 +08:00 committed by openeuler-sync-bot
parent 0618d044f8
commit 7e281a85bf
2 changed files with 66 additions and 2 deletions

View File

@ -0,0 +1,59 @@
From 0240f960850290f08b8dbdd11492a7010fc97e0b Mon Sep 17 00:00:00 2001
From: Yangyang Shen <shenyy1994@163.com>
Date: Tue, 27 Jun 2023 19:03:01 +0800
Subject: [PATCH] fix: modify units for sctl enable
---
units/sshd-keygen@ecdsa.service | 3 +++
units/sshd-keygen@ed25519.service | 3 +++
units/sshd-keygen@rsa.service | 3 +++
units/sshd.service | 3 +++
4 files changed, 12 insertions(+)
diff --git a/units/sshd-keygen@ecdsa.service b/units/sshd-keygen@ecdsa.service
index a690fe1..8202d24 100644
--- a/units/sshd-keygen@ecdsa.service
+++ b/units/sshd-keygen@ecdsa.service
@@ -6,3 +6,6 @@ ConditionFileNotEmpty="|!/etc/ssh/ssh_host_ecdsa_key"
Type="oneshot"
EnvironmentFile="-/etc/sysconfig/sshd"
ExecStart="/usr/libexec/openssh/sshd-keygen ecdsa"
+
+[Install]
+WantedBy="sshd-keygen.target"
diff --git a/units/sshd-keygen@ed25519.service b/units/sshd-keygen@ed25519.service
index 30237d3..7f4dd31 100644
--- a/units/sshd-keygen@ed25519.service
+++ b/units/sshd-keygen@ed25519.service
@@ -6,3 +6,6 @@ ConditionFileNotEmpty="|!/etc/ssh/ssh_host_ed25519_key"
Type="oneshot"
EnvironmentFile="-/etc/sysconfig/sshd"
ExecStart="/usr/libexec/openssh/sshd-keygen ed25519"
+
+[Install]
+WantedBy="sshd-keygen.target"
diff --git a/units/sshd-keygen@rsa.service b/units/sshd-keygen@rsa.service
index 209edff..a30a1e5 100644
--- a/units/sshd-keygen@rsa.service
+++ b/units/sshd-keygen@rsa.service
@@ -6,3 +6,6 @@ ConditionFileNotEmpty="|!/etc/ssh/ssh_host_rsa_key"
Type="oneshot"
EnvironmentFile="-/etc/sysconfig/sshd"
ExecStart="/usr/libexec/openssh/sshd-keygen rsa"
+
+[Install]
+WantedBy="sshd-keygen.target"
diff --git a/units/sshd.service b/units/sshd.service
index 762b8bb..7779e4e 100644
--- a/units/sshd.service
+++ b/units/sshd.service
@@ -12,3 +12,6 @@ ExecReload="/bin/kill -HUP $MAINPID"
KillMode="process"
Restart="on-failure"
RestartSec=42
+
+[Install]
+WantedBy="multi-user.target"
--
2.33.0

View File

@ -11,13 +11,15 @@
Name: sysmaster
Version: 0.2.4
Release: 1
Release: 2
Summary: redesign and reimplement process1.
License: Mulan PSL v2
URL: https://gitee.com/openeuler/sysmaster
Source0: %{name}-%{version}.tar.gz
Patch0001: backport-fix-modify-units-for-sctl-enable.patch
ExclusiveArch: x86_64 aarch64
BuildRequires: rust
@ -61,7 +63,10 @@ install -Dm0640 -t %{sysmaster_install_target}/plugin %{conf_install_source}/plu
/usr/lib/sysmaster/*
%changelog
* Tue Jun 20 2023 licunlong<shenyangyang4@huawei.com> - 0.2.4-1
* Tue Jun 27 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.4-2
- modify the sshd units
* Tue Jun 20 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.4-1
- update version to 0.2.4 for docker use
* Fri Jun 16 2023 licunlong<licunlong1@huawei.com> - 0.2.3-3