mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Make dracut module-setup.sh an autoconf config file
This ensures that module-setup.sh script will always be able to install the required dracut components regardless of how the zfs package was configured. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
146cde8f4a
commit
f0102d6e75
3
dracut/90zfs/.gitignore
vendored
Normal file
3
dracut/90zfs/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module-setup.sh
|
||||||
|
mount-zfs.sh
|
||||||
|
parse-zfs.sh
|
@ -1,23 +1,21 @@
|
|||||||
pkgdracutdir = $(datadir)/dracut/modules.d/90zfs
|
pkgdracutdir = $(datadir)/dracut/modules.d/90zfs
|
||||||
dist_pkgdracut_SCRIPTS = \
|
pkgdracut_SCRIPTS = \
|
||||||
$(top_srcdir)/dracut/90zfs/module-setup.sh \
|
$(top_srcdir)/dracut/90zfs/module-setup.sh \
|
||||||
$(top_srcdir)/dracut/90zfs/mount-zfs.sh \
|
$(top_srcdir)/dracut/90zfs/mount-zfs.sh \
|
||||||
$(top_srcdir)/dracut/90zfs/parse-zfs.sh
|
$(top_srcdir)/dracut/90zfs/parse-zfs.sh
|
||||||
|
|
||||||
all:
|
EXTRA_DIST = \
|
||||||
@list='$(dist_pkgdracut_SCRIPTS)'; \
|
$(top_srcdir)/dracut/90zfs/module-setup.sh.in \
|
||||||
for file in $$list; do \
|
$(top_srcdir)/dracut/90zfs/mount-zfs.sh.in \
|
||||||
link=$$(basename $$file); \
|
$(top_srcdir)/dracut/90zfs/parse-zfs.sh.in
|
||||||
if [ ! -e $$link ]; then \
|
|
||||||
$(LN_S) $$file $$link; \
|
|
||||||
fi \
|
|
||||||
done
|
|
||||||
|
|
||||||
clean:
|
$(pkgdracut_SCRIPTS):
|
||||||
@list='$(dist_pkgdracut_SCRIPTS)'; \
|
-$(SED) -e 's,@bindir\@,$(bindir),g' \
|
||||||
for file in $$list; do \
|
-e 's,@sbindir\@,$(sbindir),g' \
|
||||||
link=$$(basename $$file); \
|
-e 's,@udevdir\@,$(udevdir),g' \
|
||||||
if [ -L $$link ]; then \
|
-e 's,@udevruledir\@,$(udevruledir),g' \
|
||||||
$(RM) $$link; \
|
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
||||||
fi \
|
'$@.in' >'$@'
|
||||||
done
|
|
||||||
|
distclean-local::
|
||||||
|
-$(RM) $(pkgdracut_SCRIPTS)
|
||||||
|
@ -36,8 +36,7 @@ build_triplet = @build@
|
|||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
subdir = dracut/90zfs
|
subdir = dracut/90zfs
|
||||||
DIST_COMMON = $(dist_pkgdracut_SCRIPTS) $(srcdir)/Makefile.am \
|
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
$(srcdir)/Makefile.in
|
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = \
|
am__aclocal_m4_deps = \
|
||||||
$(top_srcdir)/config/always-no-unused-but-set-variable.m4 \
|
$(top_srcdir)/config/always-no-unused-but-set-variable.m4 \
|
||||||
@ -111,7 +110,7 @@ am__base_list = \
|
|||||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
am__installdirs = "$(DESTDIR)$(pkgdracutdir)"
|
am__installdirs = "$(DESTDIR)$(pkgdracutdir)"
|
||||||
SCRIPTS = $(dist_pkgdracut_SCRIPTS)
|
SCRIPTS = $(pkgdracut_SCRIPTS)
|
||||||
AM_V_GEN = $(am__v_GEN_$(V))
|
AM_V_GEN = $(am__v_GEN_$(V))
|
||||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||||
am__v_GEN_0 = @echo " GEN " $@;
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
@ -292,11 +291,16 @@ top_srcdir = @top_srcdir@
|
|||||||
udevdir = @udevdir@
|
udevdir = @udevdir@
|
||||||
udevruledir = @udevruledir@
|
udevruledir = @udevruledir@
|
||||||
pkgdracutdir = $(datadir)/dracut/modules.d/90zfs
|
pkgdracutdir = $(datadir)/dracut/modules.d/90zfs
|
||||||
dist_pkgdracut_SCRIPTS = \
|
pkgdracut_SCRIPTS = \
|
||||||
$(top_srcdir)/dracut/90zfs/module-setup.sh \
|
$(top_srcdir)/dracut/90zfs/module-setup.sh \
|
||||||
$(top_srcdir)/dracut/90zfs/mount-zfs.sh \
|
$(top_srcdir)/dracut/90zfs/mount-zfs.sh \
|
||||||
$(top_srcdir)/dracut/90zfs/parse-zfs.sh
|
$(top_srcdir)/dracut/90zfs/parse-zfs.sh
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(top_srcdir)/dracut/90zfs/module-setup.sh.in \
|
||||||
|
$(top_srcdir)/dracut/90zfs/mount-zfs.sh.in \
|
||||||
|
$(top_srcdir)/dracut/90zfs/parse-zfs.sh.in
|
||||||
|
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
@ -330,10 +334,10 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
|||||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
install-dist_pkgdracutSCRIPTS: $(dist_pkgdracut_SCRIPTS)
|
install-pkgdracutSCRIPTS: $(pkgdracut_SCRIPTS)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
test -z "$(pkgdracutdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdracutdir)"
|
test -z "$(pkgdracutdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdracutdir)"
|
||||||
@list='$(dist_pkgdracut_SCRIPTS)'; test -n "$(pkgdracutdir)" || list=; \
|
@list='$(pkgdracut_SCRIPTS)'; test -n "$(pkgdracutdir)" || list=; \
|
||||||
for p in $$list; do \
|
for p in $$list; do \
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||||
@ -356,9 +360,9 @@ install-dist_pkgdracutSCRIPTS: $(dist_pkgdracut_SCRIPTS)
|
|||||||
} \
|
} \
|
||||||
; done
|
; done
|
||||||
|
|
||||||
uninstall-dist_pkgdracutSCRIPTS:
|
uninstall-pkgdracutSCRIPTS:
|
||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
@list='$(dist_pkgdracut_SCRIPTS)'; test -n "$(pkgdracutdir)" || exit 0; \
|
@list='$(pkgdracut_SCRIPTS)'; test -n "$(pkgdracutdir)" || exit 0; \
|
||||||
files=`for p in $$list; do echo "$$p"; done | \
|
files=`for p in $$list; do echo "$$p"; done | \
|
||||||
sed -e 's,.*/,,;$(transform)'`; \
|
sed -e 's,.*/,,;$(transform)'`; \
|
||||||
test -n "$$list" || exit 0; \
|
test -n "$$list" || exit 0; \
|
||||||
@ -439,11 +443,13 @@ distclean-generic:
|
|||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-am
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-generic
|
distclean-am: clean-am distclean-generic distclean-local
|
||||||
|
|
||||||
dvi: dvi-am
|
dvi: dvi-am
|
||||||
|
|
||||||
@ -457,7 +463,7 @@ info: info-am
|
|||||||
|
|
||||||
info-am:
|
info-am:
|
||||||
|
|
||||||
install-data-am: install-dist_pkgdracutSCRIPTS
|
install-data-am: install-pkgdracutSCRIPTS
|
||||||
|
|
||||||
install-dvi: install-dvi-am
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
@ -501,41 +507,33 @@ ps: ps-am
|
|||||||
|
|
||||||
ps-am:
|
ps-am:
|
||||||
|
|
||||||
uninstall-am: uninstall-dist_pkgdracutSCRIPTS
|
uninstall-am: uninstall-pkgdracutSCRIPTS
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||||
distclean distclean-generic distclean-libtool distdir dvi \
|
distclean distclean-generic distclean-libtool distclean-local \
|
||||||
dvi-am html html-am info info-am install install-am \
|
distdir dvi dvi-am html html-am info info-am install \
|
||||||
install-data install-data-am install-dist_pkgdracutSCRIPTS \
|
install-am install-data install-data-am install-dvi \
|
||||||
install-dvi install-dvi-am install-exec install-exec-am \
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
install-html install-html-am install-info install-info-am \
|
install-html-am install-info install-info-am install-man \
|
||||||
install-man install-pdf install-pdf-am install-ps \
|
install-pdf install-pdf-am install-pkgdracutSCRIPTS install-ps \
|
||||||
install-ps-am install-strip installcheck installcheck-am \
|
install-ps-am install-strip installcheck installcheck-am \
|
||||||
installdirs maintainer-clean maintainer-clean-generic \
|
installdirs maintainer-clean maintainer-clean-generic \
|
||||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||||
ps ps-am uninstall uninstall-am \
|
ps ps-am uninstall uninstall-am uninstall-pkgdracutSCRIPTS
|
||||||
uninstall-dist_pkgdracutSCRIPTS
|
|
||||||
|
|
||||||
|
|
||||||
all:
|
$(pkgdracut_SCRIPTS):
|
||||||
@list='$(dist_pkgdracut_SCRIPTS)'; \
|
-$(SED) -e 's,@bindir\@,$(bindir),g' \
|
||||||
for file in $$list; do \
|
-e 's,@sbindir\@,$(sbindir),g' \
|
||||||
link=$$(basename $$file); \
|
-e 's,@udevdir\@,$(udevdir),g' \
|
||||||
if [ ! -e $$link ]; then \
|
-e 's,@udevruledir\@,$(udevruledir),g' \
|
||||||
$(LN_S) $$file $$link; \
|
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
||||||
fi \
|
'$@.in' >'$@'
|
||||||
done
|
|
||||||
|
|
||||||
clean:
|
distclean-local::
|
||||||
@list='$(dist_pkgdracut_SCRIPTS)'; \
|
-$(RM) $(pkgdracut_SCRIPTS)
|
||||||
for file in $$list; do \
|
|
||||||
link=$$(basename $$file); \
|
|
||||||
if [ -L $$link ]; then \
|
|
||||||
$(RM) $$link; \
|
|
||||||
fi \
|
|
||||||
done
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
@ -28,17 +28,17 @@ installkernel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
inst_rules /lib/udev/rules.d/90-zfs.rules
|
inst_rules @udevruledir@/90-zfs.rules
|
||||||
inst_rules /lib/udev/rules.d/60-zpool.rules
|
inst_rules @udevruledir@/60-zpool.rules
|
||||||
inst_rules /lib/udev/rules.d/60-zvol.rules
|
inst_rules @udevruledir@/60-zvol.rules
|
||||||
inst /etc/zfs/zdev.conf
|
inst @sysconfdir@/zfs/zdev.conf
|
||||||
inst /etc/zfs/zpool.cache
|
inst @sysconfdir@/zfs/zpool.cache
|
||||||
inst /etc/hostid
|
inst @sysconfdir@/hostid
|
||||||
dracut_install zfs
|
dracut_install @sbindir@/zfs
|
||||||
dracut_install zpool
|
dracut_install @sbindir@/zpool
|
||||||
dracut_install zpool_layout
|
dracut_install @bindir@/zpool_layout
|
||||||
dracut_install zpool_id
|
dracut_install @udevdir@/zpool_id
|
||||||
dracut_install zvol_id
|
dracut_install @udevdir@/zvol_id
|
||||||
dracut_install mount.zfs
|
dracut_install mount.zfs
|
||||||
dracut_install hostid
|
dracut_install hostid
|
||||||
inst_hook cmdline 95 "$moddir/parse-zfs.sh"
|
inst_hook cmdline 95 "$moddir/parse-zfs.sh"
|
Loading…
Reference in New Issue
Block a user