]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
bash-completion: fix runuser install
authorMike Frysinger <vapier@gentoo.org>
Fri, 24 Oct 2014 16:26:12 +0000 (12:26 -0400)
committerKarel Zak <kzak@redhat.com>
Fri, 31 Oct 2014 09:38:53 +0000 (10:38 +0100)
The runuser symlink used to depend on su being enabled, but a refactoring
broke that.  So if you build with runuser enabled but not su, you end up
with a broken symlink.  Rework the logic so it works in both cases.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
bash-completion/Makemodule.am

index 271a6db6eaa6db2625688dfae4f03a27abb265c9..d65cc8f51f7cb5e855b2117c6e44e7bd940e7068 100644 (file)
@@ -154,7 +154,11 @@ endif
 
 if BUILD_RUNUSER
 install-data-hook-bashcomp-runuser::
+if BUILD_SU
        ln -sf su $(DESTDIR)$(bashcompletiondir)/runuser
+else
+       cp $(top_srcdir)/bash-completion/su $(DESTDIR)$(bashcompletiondir)/runuser
+endif
 INSTALL_DATA_HOOKS += install-data-hook-bashcomp-runuser
 endif