mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
contrib/initramfs: switch to automake
Use automake to build initramfs scripts and hooks. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes #6761
This commit is contained in:
@@ -0,0 +1 @@
|
||||
zfs
|
||||
@@ -0,0 +1,20 @@
|
||||
hooksdir = $(datarootdir)/initramfs-tools/hooks
|
||||
|
||||
hooks_SCRIPTS = \
|
||||
zfs
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(top_srcdir)/contrib/initramfs/hooks/zfs.in
|
||||
|
||||
$(hooks_SCRIPTS):%:%.in
|
||||
-$(SED) -e 's,@sbindir\@,$(sbindir),g' \
|
||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
||||
-e 's,@udevdir\@,$(udevdir),g' \
|
||||
-e 's,@udevruledir\@,$(udevruledir),g' \
|
||||
$< >'$@'
|
||||
|
||||
clean-local::
|
||||
-$(RM) $(hooks_SCRIPTS)
|
||||
|
||||
distclean-local::
|
||||
-$(RM) $(hooks_SCRIPTS)
|
||||
@@ -8,14 +8,18 @@ PREREQ="zdev"
|
||||
|
||||
# These prerequisites are provided by the zfsutils package. The zdb utility is
|
||||
# not strictly required, but it can be useful at the initramfs recovery prompt.
|
||||
COPY_EXEC_LIST="/sbin/zdb /sbin/zpool /sbin/zfs /sbin/mount.zfs"
|
||||
COPY_EXEC_LIST="$COPY_EXEC_LIST /usr/bin/dirname /lib/udev/vdev_id"
|
||||
COPY_FILE_LIST="/etc/hostid /etc/zfs/zpool.cache /etc/default/zfs"
|
||||
COPY_FILE_LIST="$COPY_FILE_LIST /etc/zfs/zfs-functions /etc/zfs/vdev_id.conf"
|
||||
COPY_FILE_LIST="$COPY_FILE_LIST /lib/udev/rules.d/69-vdev.rules"
|
||||
# The mount helper mount.zfs must be installed in /sbin because this path is
|
||||
# hardcoded in the mount(8) for security reasons.
|
||||
COPY_EXEC_LIST="@sbindir@/zdb @sbindir@/zpool @sbindir@/zfs /sbin/mount.zfs"
|
||||
COPY_EXEC_LIST="$COPY_EXEC_LIST @udevdir@/vdev_id"
|
||||
COPY_FILE_LIST="/etc/hostid @sysconfdir@/zfs/zpool.cache"
|
||||
COPY_FILE_LIST="$COPY_FILE_LIST @sysconfdir@/default/zfs"
|
||||
COPY_FILE_LIST="$COPY_FILE_LIST @sysconfdir@/zfs/zfs-functions"
|
||||
COPY_FILE_LIST="$COPY_FILE_LIST @sysconfdir@/zfs/vdev_id.conf"
|
||||
COPY_FILE_LIST="$COPY_FILE_LIST @udevruledir@/69-vdev.rules"
|
||||
|
||||
# These prerequisites are provided by the base system.
|
||||
COPY_EXEC_LIST="$COPY_EXEC_LIST /bin/hostname /sbin/blkid"
|
||||
COPY_EXEC_LIST="$COPY_EXEC_LIST /usr/bin/dirname /bin/hostname /sbin/blkid"
|
||||
|
||||
# Explicitly specify all kernel modules because automatic dependency resolution
|
||||
# is unreliable on many systems.
|
||||
@@ -82,7 +86,7 @@ else
|
||||
fi
|
||||
|
||||
for ii in zfs zfs.conf spl spl.conf
|
||||
do
|
||||
do
|
||||
if [ -f "/etc/modprobe.d/$ii" ]; then
|
||||
if [ ! -d "$DESTDIR/etc/modprobe.d" ]; then
|
||||
mkdir -p $DESTDIR/etc/modprobe.d
|
||||
Reference in New Issue
Block a user