mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
Merge pull request #195 from Conan-Kudo/use-libexec
Makefile, fsck: Use libexec instead of lib
This commit is contained in:
commit
d01f3f590c
12
Makefile
12
Makefile
@ -105,14 +105,14 @@ else
|
|||||||
ROOT_SBINDIR?=$(PREFIX)/sbin
|
ROOT_SBINDIR?=$(PREFIX)/sbin
|
||||||
INITRAMFS_DIR=/etc/initramfs-tools
|
INITRAMFS_DIR=/etc/initramfs-tools
|
||||||
endif
|
endif
|
||||||
LIBDIR=$(PREFIX)/lib
|
LIBEXECDIR=$(PREFIX)/libexec
|
||||||
|
|
||||||
PKGCONFIG_SERVICEDIR:=$(shell $(PKG_CONFIG) --variable=systemdsystemunitdir systemd)
|
PKGCONFIG_SERVICEDIR:=$(shell $(PKG_CONFIG) --variable=systemdsystemunitdir systemd)
|
||||||
ifeq (,$(PKGCONFIG_SERVICEDIR))
|
ifeq (,$(PKGCONFIG_SERVICEDIR))
|
||||||
$(warning skipping systemd integration)
|
$(warning skipping systemd integration)
|
||||||
else
|
else
|
||||||
BCACHEFSCK_ARGS=-f -n
|
BCACHEFSCK_ARGS=-f -n
|
||||||
systemd_libfiles=\
|
systemd_libexecfiles=\
|
||||||
fsck/bcachefsck_fail \
|
fsck/bcachefsck_fail \
|
||||||
fsck/bcachefsck_all
|
fsck/bcachefsck_all
|
||||||
|
|
||||||
@ -133,14 +133,14 @@ built_scripts+=\
|
|||||||
|
|
||||||
%.service: %.service.in
|
%.service: %.service.in
|
||||||
@echo " [SED] $@"
|
@echo " [SED] $@"
|
||||||
$(Q)sed -e "s|@libdir@|$(LIBDIR)|g" \
|
$(Q)sed -e "s|@libexecdir@|$(LIBEXECDIR)|g" \
|
||||||
-e "s|@bcachefsck_args@|$(BCACHEFSCK_ARGS)|g" < $< > $@
|
-e "s|@bcachefsck_args@|$(BCACHEFSCK_ARGS)|g" < $< > $@
|
||||||
|
|
||||||
fsck/bcachefsck_all: fsck/bcachefsck_all.in
|
fsck/bcachefsck_all: fsck/bcachefsck_all.in
|
||||||
@echo " [SED] $@"
|
@echo " [SED] $@"
|
||||||
$(Q)sed -e "s|@bcachefsck_args@|$(BCACHEFSCK_ARGS)|g" < $< > $@
|
$(Q)sed -e "s|@bcachefsck_args@|$(BCACHEFSCK_ARGS)|g" < $< > $@
|
||||||
|
|
||||||
optional_build+=$(systemd_libfiles) $(systemd_services)
|
optional_build+=$(systemd_libexecfiles) $(systemd_services)
|
||||||
optional_install+=install_systemd
|
optional_install+=install_systemd
|
||||||
endif # PKGCONFIG_SERVICEDIR
|
endif # PKGCONFIG_SERVICEDIR
|
||||||
|
|
||||||
@ -226,8 +226,8 @@ install: bcachefs $(optional_install)
|
|||||||
echo "copy_exec $(ROOT_SBINDIR)/bcachefs /sbin/bcachefs" >> $(DESTDIR)$(INITRAMFS_HOOK)
|
echo "copy_exec $(ROOT_SBINDIR)/bcachefs /sbin/bcachefs" >> $(DESTDIR)$(INITRAMFS_HOOK)
|
||||||
|
|
||||||
.PHONY: install_systemd
|
.PHONY: install_systemd
|
||||||
install_systemd: $(systemd_services) $(systemd_libfiles)
|
install_systemd: $(systemd_services) $(systemd_libexecfiles)
|
||||||
$(INSTALL) -m0755 -D $(systemd_libfiles) -t $(DESTDIR)$(LIBDIR)
|
$(INSTALL) -m0755 -D $(systemd_libexecfiles) -t $(DESTDIR)$(LIBEXECDIR)
|
||||||
$(INSTALL) -m0644 -D $(systemd_services) -t $(DESTDIR)$(PKGCONFIG_SERVICEDIR)
|
$(INSTALL) -m0644 -D $(systemd_services) -t $(DESTDIR)$(PKGCONFIG_SERVICEDIR)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
@ -10,7 +10,7 @@ Documentation=man:bcachefsck_all(8)
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
Environment=EMAIL_ADDR=root
|
Environment=EMAIL_ADDR=root
|
||||||
ExecStart=@libdir@/bcachefsck_fail "${EMAIL_ADDR}" bcachefsck_all
|
ExecStart=@libexecdir@/bcachefsck_fail "${EMAIL_ADDR}" bcachefsck_all
|
||||||
User=mail
|
User=mail
|
||||||
Group=mail
|
Group=mail
|
||||||
SupplementaryGroups=systemd-journal
|
SupplementaryGroups=systemd-journal
|
||||||
|
@ -10,7 +10,7 @@ Documentation=man:bcachefs(8)
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
Environment=EMAIL_ADDR=root
|
Environment=EMAIL_ADDR=root
|
||||||
ExecStart=@libdir@/bcachefsck_fail "${EMAIL_ADDR}" bcachefs %f
|
ExecStart=@libexecdir@/bcachefsck_fail "${EMAIL_ADDR}" bcachefs %f
|
||||||
User=mail
|
User=mail
|
||||||
Group=mail
|
Group=mail
|
||||||
SupplementaryGroups=systemd-journal
|
SupplementaryGroups=systemd-journal
|
||||||
|
Loading…
Reference in New Issue
Block a user