mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
Centralize variable substitution
A bunch of places need to edit files to incorporate the configured paths i.e. bindir, sbindir etc. Move this logic into a common file. Create arc_summary by copying arc_summary[23] as appropriate at build time instead of install time. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Closes #10559
This commit is contained in:
committed by
Brian Behlendorf
parent
bdb518c13a
commit
38e2e9ce83
+5
-36
@@ -1,38 +1,7 @@
|
||||
initdir = $(DEFAULT_INIT_DIR)
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
EXTRA_DIST += README.md
|
||||
|
||||
init_SCRIPTS = zfs-import zfs-mount zfs-share zfs-zed
|
||||
|
||||
initconfdir = $(DEFAULT_INITCONF_DIR)
|
||||
|
||||
EXTRA_DIST = \
|
||||
zfs-share.in \
|
||||
zfs-import.in \
|
||||
zfs-mount.in \
|
||||
zfs-zed.in \
|
||||
README.md
|
||||
|
||||
$(init_SCRIPTS):%:%.in Makefile
|
||||
-(if [ -e /etc/debian_version ]; then \
|
||||
NFS_SRV=nfs-kernel-server; \
|
||||
else \
|
||||
NFS_SRV=nfs; \
|
||||
fi; \
|
||||
if [ -e /sbin/openrc-run ]; then \
|
||||
SHELL=/sbin/openrc-run; \
|
||||
else \
|
||||
SHELL=/bin/sh; \
|
||||
fi; \
|
||||
$(SED) \
|
||||
-e 's,@bindir\@,$(bindir),g' \
|
||||
-e 's,@sbindir\@,$(sbindir),g' \
|
||||
-e 's,@udevdir\@,$(udevdir),g' \
|
||||
-e 's,@udevruledir\@,$(udevruledir),g' \
|
||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
||||
-e 's,@initconfdir\@,$(initconfdir),g' \
|
||||
-e 's,@initdir\@,$(initdir),g' \
|
||||
-e 's,@runstatedir\@,$(runstatedir),g' \
|
||||
-e "s,@SHELL\@,$$SHELL,g" \
|
||||
-e "s,@NFS_SRV\@,$$NFS_SRV,g" \
|
||||
$< >'$@'; \
|
||||
chmod +x '$@')
|
||||
|
||||
CLEANFILES = $(init_SCRIPTS)
|
||||
SUBSTFILES += $(init_SCRIPTS)
|
||||
|
||||
Regular → Executable
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!@SHELL@
|
||||
#!@DEFAULT_INIT_SHELL@
|
||||
#
|
||||
# zfs-import This script will import ZFS pools
|
||||
#
|
||||
|
||||
Regular → Executable
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!@SHELL@
|
||||
#!@DEFAULT_INIT_SHELL@
|
||||
#
|
||||
# zfs-mount This script will mount/umount the zfs filesystems.
|
||||
#
|
||||
|
||||
Regular → Executable
+3
-3
@@ -1,4 +1,4 @@
|
||||
#!@SHELL@
|
||||
#!@DEFAULT_INIT_SHELL@
|
||||
#
|
||||
# zfs-share This script will network share zfs filesystems and volumes.
|
||||
#
|
||||
@@ -13,8 +13,8 @@
|
||||
# Required-Stop: $local_fs $network $remote_fs zfs-mount
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Should-Start: iscsi iscsitarget istgt scst @NFS_SRV@ samba samba4 zfs-mount zfs-zed
|
||||
# Should-Stop: iscsi iscsitarget istgt scst @NFS_SRV@ samba samba4 zfs-mount zfs-zed
|
||||
# Should-Start: iscsi iscsitarget istgt scst @DEFAULT_INIT_NFS_SERVER@ samba samba4 zfs-mount zfs-zed
|
||||
# Should-Stop: iscsi iscsitarget istgt scst @DEFAULT_INIT_NFS_SERVER@ samba samba4 zfs-mount zfs-zed
|
||||
# Short-Description: Network share ZFS datasets and volumes.
|
||||
# Description: Run the `zfs share -a` or `zfs unshare -a` commands
|
||||
# for controlling iSCSI, NFS, or CIFS network shares.
|
||||
|
||||
Regular → Executable
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!@SHELL@
|
||||
#!@DEFAULT_INIT_SHELL@
|
||||
#
|
||||
# zfs-zed
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user