mirror of
https://github.com/linux-msm/rmtfs.git
synced 2024-11-23 12:14:12 +08:00
rmtfs.service: Add systemd service
Add rmtfs.service and install this. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
parent
976aa0ddbe
commit
6d2cfcddfc
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
rmtfs
|
||||
*.o
|
||||
rmtfs.service
|
||||
|
12
Makefile
12
Makefile
@ -3,6 +3,8 @@ OUT := rmtfs
|
||||
CFLAGS += -Wall -g -O2
|
||||
LDFLAGS += -lqrtr -ludev -lpthread
|
||||
prefix = /usr/local
|
||||
bindir := $(prefix)/bin
|
||||
servicedir := $(prefix)/lib/systemd/system
|
||||
|
||||
SRCS := qmi_rmtfs.c rmtfs.c rproc.c sharedmem.c storage.c util.c
|
||||
OBJS := $(SRCS:.c=.o)
|
||||
@ -13,9 +15,13 @@ $(OUT): $(OBJS)
|
||||
%.c: %.qmi
|
||||
qmic -k < $<
|
||||
|
||||
install: $(OUT)
|
||||
install -D -m 755 $< $(DESTDIR)$(prefix)/bin/$<
|
||||
rmtfs.service: rmtfs.service.in
|
||||
@sed 's+RMTFS_PATH+$(bindir)+g' $< > $@
|
||||
|
||||
install: $(OUT) rmtfs.service
|
||||
@install -D -m 755 $(OUT) $(DESTDIR)$(prefix)/bin/$(OUT)
|
||||
@install -D -m 644 rmtfs.service $(DESTDIR)$(servicedir)/rmtfs.service
|
||||
|
||||
clean:
|
||||
rm -f $(OUT) $(OBJS)
|
||||
rm -f $(OUT) $(OBJS) rmtfs.service
|
||||
|
||||
|
11
rmtfs.service.in
Normal file
11
rmtfs.service.in
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Qualcomm remotefs service
|
||||
Requires=qrtr-ns.service
|
||||
After=qrtr-ns.service
|
||||
|
||||
[Service]
|
||||
ExecStart=RMTFS_PATH/rmtfs -r -P -s
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user