summaryrefslogtreecommitdiffstats
path: root/core/modules/sshd
diff options
context:
space:
mode:
authorSimon Rettberg2021-10-14 14:27:28 +0200
committerSimon Rettberg2021-10-14 14:27:28 +0200
commit0d10cf2150e9aadad7153d00ebd2acf67d4cbcff (patch)
treef013b7e46288b7947db61b85b83aec34b5c08329 /core/modules/sshd
parent[virt-manager] Enable automatic resize of guest system (diff)
downloadmltk-0d10cf2150e9aadad7153d00ebd2acf67d4cbcff.tar.gz
mltk-0d10cf2150e9aadad7153d00ebd2acf67d4cbcff.tar.xz
mltk-0d10cf2150e9aadad7153d00ebd2acf67d4cbcff.zip
[sshd] Properly install sshd
Diffstat (limited to 'core/modules/sshd')
-rw-r--r--core/modules/sshd/TODO3
l---------[-rw-r--r--]core/modules/sshd/data/etc/systemd/system/sshd.service11
-rw-r--r--core/modules/sshd/data/etc/tmpfiles.d/sshd.conf3
-rw-r--r--core/modules/sshd/module.build11
-rw-r--r--core/modules/sshd/module.conf9
-rw-r--r--core/modules/sshd/module.conf.ubuntu4
6 files changed, 14 insertions, 27 deletions
diff --git a/core/modules/sshd/TODO b/core/modules/sshd/TODO
deleted file mode 100644
index b4e0a9c1..00000000
--- a/core/modules/sshd/TODO
+++ /dev/null
@@ -1,3 +0,0 @@
-make mltk install sshd if its not installed
-
-Distros: Ubuntu, Suse, soon Arch!
diff --git a/core/modules/sshd/data/etc/systemd/system/sshd.service b/core/modules/sshd/data/etc/systemd/system/sshd.service
index 999187cd..75049479 100644..120000
--- a/core/modules/sshd/data/etc/systemd/system/sshd.service
+++ b/core/modules/sshd/data/etc/systemd/system/sshd.service
@@ -1,10 +1 @@
-[Unit]
-Description=OpenSSH Daemon
-Requires=systemd-tmpfiles-setup.service
-After=systemd-tmpfiles-setup.service
-
-[Service]
-ExecStart=/usr/sbin/sshd -D
-ExecReload=/bin/kill -HUP $MAINPID
-KillMode=process
-Restart=always
+/lib/systemd/system/ssh.service \ No newline at end of file
diff --git a/core/modules/sshd/data/etc/tmpfiles.d/sshd.conf b/core/modules/sshd/data/etc/tmpfiles.d/sshd.conf
index ffb34ca6..26fc0b3a 100644
--- a/core/modules/sshd/data/etc/tmpfiles.d/sshd.conf
+++ b/core/modules/sshd/data/etc/tmpfiles.d/sshd.conf
@@ -1,3 +1,2 @@
-d /var/run/sshd 0755 root root
-d /var/empty/sshd 0755 root root
+d /run/sshd 0755 root root -
diff --git a/core/modules/sshd/module.build b/core/modules/sshd/module.build
index fed20806..4efccbe9 100644
--- a/core/modules/sshd/module.build
+++ b/core/modules/sshd/module.build
@@ -4,18 +4,9 @@ fetch_source() {
}
build() {
-
- local BIN_LOCATION="$(which sshd)"
- [ ! -z "${BIN_LOCATION}" ] && BIN_LOCATION=$(readlink -f "$BIN_LOCATION")
- if [ ! -z "${BIN_LOCATION}" -a -e "${BIN_LOCATION}" ]; then
- tarcopy "${BIN_LOCATION}" "${MODULE_BUILD_DIR}"
- else
- perror "'sshd' not found on the system! Please install it."
- fi
+ :
}
post_copy() {
- mkdir -p "${TARGET_BUILD_DIR}/var/lib/empty" # suse
-
chmod -R go-rwx "${TARGET_BUILD_DIR}/etc/ssh"
}
diff --git a/core/modules/sshd/module.conf b/core/modules/sshd/module.conf
index 33c7f30a..a4df03cf 100644
--- a/core/modules/sshd/module.conf
+++ b/core/modules/sshd/module.conf
@@ -1,4 +1,9 @@
#!/bin/bash
-REQUIRED_BINARIES="sshd"
REQUIRED_LIBRARIES=""
-REQUIRED_DIRECTORIES=""
+REQUIRED_BINARIES="
+ sshd
+"
+REQUIRED_FILES="
+ /lib/systemd/system/ssh.service
+ /usr/lib/openssh/ssh-session-cleanup
+"
diff --git a/core/modules/sshd/module.conf.ubuntu b/core/modules/sshd/module.conf.ubuntu
new file mode 100644
index 00000000..31137b90
--- /dev/null
+++ b/core/modules/sshd/module.conf.ubuntu
@@ -0,0 +1,4 @@
+#!/bin/bash
+REQUIRED_CONTENT_PACKAGES="
+ openssh-server
+"