22.03.2017 23:47, John Florian пишет:
> I build an mostly-stateless appliance OS derived from Fedora (25 ATM)
> and have several custom units to make it all possible.  My units had
> worked great with F21, but are now giving me problems with F25.  One
> pair of the custom units do some trickery to relocate sshd host keys
> from /etc/ssh to an alternate location that provides persistence:
> 
> $ systemctl cat sshd-persist-keys.service
> # /usr/lib/systemd/system/sshd-persist-keys.service
> [Unit]
> Description=OpenSSH server - persist volatile keys for the AOS
> After=sshd-keygen.target
> Before=sshd.service
> Wants=sshd-keygen.target
> 
> [Service]
> ExecStart=/usr/sbin/sshd-persist-keys
> Type=oneshot
> RemainAfterExit=yes
> 
> [Install]
> WantedBy=multi-user.target
> 
> 
> $ systemctl cat sshd-restore-keys.service
> # /usr/lib/systemd/system/sshd-restore-keys.service
> [Unit]
> Description=OpenSSH server - restore persisted keys for the AOS
> After=aos-storage-init.service
> Before=sshd-keygen@rsa.service sshd-keygen@ecdsa.service sshd-keygen@ed
> 25519.service
> 
> [Service]
> ExecStart=/usr/sbin/sshd-restore-keys
> Type=oneshot
> RemainAfterExit=yes
> 
> [Install]
> WantedBy=multi-user.target
> 
> 
> I found that on some boots, sshd wasn't getting started.  With the help
> of booting with systemd.log_level=debug I learned:
> 
> $ sudo journalctl | grep conflict

Please make full log available as well as actual unit definitions that
are not started.

> Mar 22 16:11:42 localhost systemd[1]: sshd.service: Looking at job
> sshd.service/start conflicted_by=no
> Mar 22 16:11:42 localhost systemd[1]: sshd.service: Looking at job
> sshd.service/stop conflicted_by=yes
> Mar 22 16:11:42 localhost systemd[1]: sshd.service: Fixing conflicting
> jobs sshd.service/start,sshd.service/stop by deleting job
> sshd.service/start

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to