From: Christophe Vu-Brugier Date: Thu, 3 Sep 2015 07:55:26 +0000 (+0200) Subject: targetcli-fb: systemd support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c6ff869eee978eb82ae740c60a7282860a300d9d;p=buildroot.git targetcli-fb: systemd support The systemd service file is taken from Fedora. Signed-off-by: Christophe Vu-Brugier Reviewed-by: Vicente Olivert Riera Tested-by: Vicente Olivert Riera Signed-off-by: Peter Korsgaard --- diff --git a/package/targetcli-fb/target.service b/package/targetcli-fb/target.service new file mode 100644 index 0000000000..400284edd1 --- /dev/null +++ b/package/targetcli-fb/target.service @@ -0,0 +1,14 @@ +[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 diff --git a/package/targetcli-fb/targetcli-fb.mk b/package/targetcli-fb/targetcli-fb.mk index 0a64c4651d..cf7f29ff4e 100644 --- a/package/targetcli-fb/targetcli-fb.mk +++ b/package/targetcli-fb/targetcli-fb.mk @@ -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