diff --git a/Makefile b/Makefile index e5551280..4683cf6c 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,7 @@ install: $(DESTDIR)/etc/modprobe.d \ $(DESTDIR)/etc/modules-load.d \ $(DESTDIR)/etc/dracut.conf.d \ + $(DESTDIR)/etc/systemd/system/sshd.service.d \ $(DESTDIR)/etc/systemd/system/systemd-udevd.d $(INSTALL) -m755 startup/interface-rename-sideway $(DESTDIR)/$(INSTALLER_DIR) @@ -72,6 +73,7 @@ install: $(INSTALL) -m755 startup/preinit startup/S05ramdisk $(DESTDIR)/$(INSTALLER_DIR)/ $(INSTALL) -m644 startup/systemd-udevd_depmod.conf $(DESTDIR)/etc/systemd/system/systemd-udevd.d/installer.conf $(INSTALL) -m644 startup/interface-rename-sideway.service $(DESTDIR)/$(SERVICE_DIR) + $(INSTALL) -m644 startup/sshd_installer.conf $(DESTDIR)/etc/systemd/system/sshd.service.d/ # Generate a multipath configuration from sm's copy, removing # the blacklist and blacklist_exception sections. diff --git a/startup/sshd_installer.conf b/startup/sshd_installer.conf new file mode 100644 index 00000000..70b57ea3 --- /dev/null +++ b/startup/sshd_installer.conf @@ -0,0 +1,5 @@ +[Unit] +ConditionKernelCommandLine=sshpassword + +[Service] +ExecStartPre=/bin/sh -c '/bin/sed -e "s/.*\<sshpassword=\([^ ]*\).*/root:\1/" /proc/cmdline | /sbin/chpasswd'