Skip to content

Commit 28a7277

Browse files
committed
Add systemd scst.service
1 parent 08f5f43 commit 28a7277

4 files changed

Lines changed: 28 additions & 0 deletions

File tree

debian/rules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ install:
9090
mv "$(DESTDIR)"/usr/man "$(DESTDIR)"/usr/share/man && \
9191
dh_install && \
9292
dh_installman && \
93+
dh_installsystemd --name=scst --no-start && \
9394
dh_installchangelogs && \
9495
dh_compress && \
9596
dh_fixperms && \

debian/scstadmin.install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
etc/init.d/scst
2+
lib/systemd/system/scst.service
23
usr/sbin/scstadmin
34
usr/share/perl/
45
usr/lib/

scstadmin/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ install install_vendor:
110110
mkdir -p $(DESTDIR)$(DEFAULTDIR); \
111111
install -m 755 default/scst $(DESTDIR)$(DEFAULTDIR); \
112112
fi
113+
# Install systemd service file
114+
if [ -d systemd ]; then \
115+
install -d $(DESTDIR)/lib/systemd/system; \
116+
install -m 644 systemd/scst.service \
117+
$(DESTDIR)/lib/systemd/system/scst.service; \
118+
fi
113119
for s in iscsi-scst qla2x00t; do \
114120
{ $(call REMOVE_FN,$$s); } >/dev/null 2>&1; \
115121
done

scstadmin/systemd/scst.service

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[Unit]
2+
Description=SCST - A Generic SCSI Target Subsystem
3+
Documentation=man:scstadmin(1) man:scst.conf(5)
4+
After=network-online.target local-fs.target
5+
Wants=network-online.target
6+
DefaultDependencies=no
7+
Before=shutdown.target
8+
9+
[Service]
10+
Type=oneshot
11+
RemainAfterExit=yes
12+
EnvironmentFile=-/etc/default/scst
13+
ExecStart=/etc/init.d/scst start
14+
ExecStop=/etc/init.d/scst stop
15+
ExecReload=/etc/init.d/scst reload
16+
TimeoutStartSec=5min
17+
TimeoutStopSec=5min
18+
19+
[Install]
20+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)