debian, scstadmin: Add systemd scst.service

Add systemd service file when packaging for Debian.  Current
systemd will automatically generate one, but this functionality
will be removed in a future version of systemd.
This commit is contained in:
Brian M
2025-10-28 18:15:04 +03:00
committed by Gleb Chesnokov
parent 08f5f43df8
commit 0d3c9018af
4 changed files with 28 additions and 0 deletions
+1
View File
@@ -90,6 +90,7 @@ install:
mv "$(DESTDIR)"/usr/man "$(DESTDIR)"/usr/share/man && \
dh_install && \
dh_installman && \
dh_installsystemd --name=scst --no-start && \
dh_installchangelogs && \
dh_compress && \
dh_fixperms && \
+1
View File
@@ -1,4 +1,5 @@
etc/init.d/scst
lib/systemd/system/scst.service
usr/sbin/scstadmin
usr/share/perl/
usr/lib/
+6
View File
@@ -110,6 +110,12 @@ install install_vendor:
mkdir -p $(DESTDIR)$(DEFAULTDIR); \
install -m 755 default/scst $(DESTDIR)$(DEFAULTDIR); \
fi
# Install systemd service file
if [ -d systemd ]; then \
install -d $(DESTDIR)/lib/systemd/system; \
install -m 644 systemd/scst.service \
$(DESTDIR)/lib/systemd/system/scst.service; \
fi
for s in iscsi-scst qla2x00t; do \
{ $(call REMOVE_FN,$$s); } >/dev/null 2>&1; \
done
+20
View File
@@ -0,0 +1,20 @@
[Unit]
Description=SCST - A Generic SCSI Target Subsystem
Documentation=man:scstadmin(1) man:scst.conf(5)
After=network-online.target local-fs.target
Wants=network-online.target
DefaultDependencies=no
Before=shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=-/etc/default/scst
ExecStart=/etc/init.d/scst start
ExecStop=/etc/init.d/scst stop
ExecReload=/etc/init.d/scst reload
TimeoutStartSec=5min
TimeoutStopSec=5min
[Install]
WantedBy=multi-user.target