Bug 5597

Summary: openssh: can't restart systemd services during install
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Yevhen <kirgene>
Component: connectivityAssignee: Randy Witt <randy.e.witt>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, richard.purdie
Version: unspecified   
Target Milestone: 1.7.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Yevhen 2013-11-25 15:33:27 UTC
I'm using systemd as init system and opkg as package manager.
During installation of openssh package I'm getting following errors:

* pkg_run_script: package "openssh-sshd" postinst script returned status 1.
* opkg_configure: openssh-sshd.postinst returned 1.

As I've investigated the problem is in "postinst" script namely in the following line:

systemctl restart sshd.socket sshd@.service sshdgenkeys.service

Seems that sshd@.service can't be restarted in such way.
Comment 1 Richard Purdie 2013-11-28 15:42:11 UTC
Ross: There are various patches around on this, can you figure out what we should be doing there?
Comment 2 Randy Witt 2015-05-19 21:54:20 UTC
I tried building an image in 1.7.1 with the ssh-server-openssh feature enabled and it was successful

I also built core-image-minimal without the feature enabled and tried installing the package manually and it was successful with this output.

opkg install libcrypto1.0.0_1.0.1m-r0_core2-64.ipk libwrap0_7.6-r10_core2-64.ipk openssh-keygen_6.6p1-r0_core2-64.ipk openssh-sshd_6.6p1-r0_core2-64.ipk
Installing libcrypto1.0.0 (1.0.1m-r0) on root.
libcrypto1.0.0: unsatisfied recommendation for openssl-conf
Installing libwrap0 (7.6-r10) on root.
Installing openssh-keygen (6.6p1-r0) on root.
Installing openssh-sshd (6.6p1-r0) on root.
Running useradd commands...
NOTE: Performing useradd with [ --system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd] and 10 times of retry
Created symlink from /etc/systemd/system/sockets.target.wants/sshd.socket to /lib/systemd/system/sshd.socket.
Configuring libwrap0.
Configuring libcrypto1.0.0.
Configuring openssh-keygen.
Configuring openssh-sshd.