Commit c6ff869e authored by Christophe Vu-Brugier's avatar Christophe Vu-Brugier Committed by Peter Korsgaard
Browse files

targetcli-fb: systemd support



The systemd service file is taken from Fedora.

Signed-off-by: default avatarChristophe Vu-Brugier <cvubrugier@fastmail.fm>
Reviewed-by: default avatarVicente Olivert Riera <Vincent.Riera@imgtec.com>
Tested-by: default avatarVicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 9829b82c
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
[Unit]
Description=Restore LIO kernel target configuration
Requires=sys-kernel-config.mount
After=sys-kernel-config.mount network.target local-fs.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/targetctl restore
ExecStop=/usr/bin/targetctl clear
SyslogIdentifier=target

[Install]
WantedBy=multi-user.target
+7 −1
Original line number Diff line number Diff line
@@ -12,7 +12,13 @@ TARGETCLI_FB_SETUP_TYPE = setuptools
TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six

define TARGETCLI_FB_INSTALL_INIT_SYSV
	$(INSTALL) -m 0755 -D package/targetcli-fb/S50target $(TARGET_DIR)/etc/init.d/S50target
	$(INSTALL) -m 0755 -D package/targetcli-fb/S50target \
		$(TARGET_DIR)/etc/init.d/S50target
endef

define TARGETCLI_FB_INSTALL_INIT_SYSTEMD
	$(INSTALL) -m 0644 -D package/targetcli-fb/target.service \
		$(TARGET_DIR)/usr/lib/systemd/system/target.service
endef

# Targetcli stores its configuration in /etc/target/saveconfig.json