diff options
author | Brian Behlendorf <[email protected]> | 2011-08-09 16:49:18 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-08-19 16:26:14 -0700 |
commit | aa2b4896c93bbb2652ddc5e10e66175e54ff56c8 (patch) | |
tree | e0868dd6517d1f17fe8ecb09096706c54760a31a /etc/init.d/Makefile.am | |
parent | f0102d6e75d51b8d92624ba054a3fa54c807fb7f (diff) |
Fix autoconf variable substitution in init scripts.
Change the variable substitution in the init script templates
according to the method described in the Autoconf manual;
Chapter 4.7.2: Installation Directory Variables.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'etc/init.d/Makefile.am')
-rw-r--r-- | etc/init.d/Makefile.am | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/etc/init.d/Makefile.am b/etc/init.d/Makefile.am index 00bb2681a..94a21680b 100644 --- a/etc/init.d/Makefile.am +++ b/etc/init.d/Makefile.am @@ -1,5 +1,22 @@ -EXTRA_DIST = zfs.fedora zfs.gentoo zfs.lsb zfs.lunar zfs.redhat zfs.arch +initdir = $(DEFAULT_INIT_DIR) +init_SCRIPTS = zfs -install-data-local: - @instdest=$(DESTDIR)$(DEFAULT_INIT_DIR)/zfs; \ - $(INSTALL) -TD zfs.$(DEFAULT_INIT_SCRIPT) $$instdest +EXTRA_DIST = \ + $(top_srcdir)/etc/init.d/zfs.fedora.in \ + $(top_srcdir)/etc/init.d/zfs.gentoo.in \ + $(top_srcdir)/etc/init.d/zfs.lsb.in \ + $(top_srcdir)/etc/init.d/zfs.lunar.in \ + $(top_srcdir)/etc/init.d/zfs.redhat.in \ + $(top_srcdir)/etc/init.d/zfs.arch.in + +$(init_SCRIPTS): + -$(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,@initdir\@,$(initdir),g' \ + 'zfs.$(DEFAULT_INIT_SCRIPT).in' >'$@' + +distclean-local:: + -$(RM) $(init_SCRIPTS) |