mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +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 @@
|
||||
scriptsdir = $(datarootdir)/initramfs-tools/scripts
|
||||
|
||||
scripts_SCRIPTS = \
|
||||
zfs
|
||||
|
||||
SUBDIRS = local-top
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(top_srcdir)/contrib/initramfs/scripts/zfs.in
|
||||
|
||||
$(scripts_SCRIPTS):%:%.in
|
||||
-$(SED) -e 's,@sbindir\@,$(sbindir),g' \
|
||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
||||
$< >'$@'
|
||||
|
||||
clean-local::
|
||||
-$(RM) $(scripts_SCRIPTS)
|
||||
|
||||
distclean-local::
|
||||
-$(RM) $(scripts_SCRIPTS)
|
||||
@@ -0,0 +1,3 @@
|
||||
localtopdir = $(datarootdir)/initramfs-tools/scripts/local-top
|
||||
|
||||
EXTRA_DIST = zfs
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# Paths to what we need - in the initrd, these paths are hardcoded,
|
||||
# so override the defines in zfs-functions.
|
||||
ZFS="/sbin/zfs"
|
||||
ZPOOL="/sbin/zpool"
|
||||
ZPOOL_CACHE="/etc/zfs/zpool.cache"
|
||||
ZFS="@sbindir@/zfs"
|
||||
ZPOOL="@sbindir@/zpool"
|
||||
ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
|
||||
export ZFS ZPOOL ZPOOL_CACHE
|
||||
|
||||
# This runs any scripts that should run before we start importing
|
||||
@@ -610,7 +610,7 @@ setup_snapshot_booting()
|
||||
# Separate the full snapshot ('$snap') into it's filesystem and
|
||||
# snapshot names. Would have been nice with a split() function..
|
||||
rootfs="${snap%%@*}"
|
||||
snapname="${snap##*@}"
|
||||
snapname="${snap##*@}"
|
||||
ZFS_BOOTFS="${rootfs}_${snapname}"
|
||||
|
||||
if ! grep -qiE '(^|[^\\](\\\\)* )(rollback)=(on|yes|1)( |$)' /proc/cmdline
|
||||
Reference in New Issue
Block a user