From: Jim Meyering Date: Tue, 9 Oct 2007 07:33:48 +0000 (+0200) Subject: Now that we don't install su, don't make misleading suggestions. X-Git-Tag: v6.9.89~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c25152b4553803135788553aa57892775e92f1cc;p=thirdparty%2Fcoreutils.git Now that we don't install su, don't make misleading suggestions. * src/Makefile.am (install-exec-local) [$(INSTALL_SU) != yes]: Don't suggest running "make install-root". (uninstall-local) [$(INSTALL_SU) != yes]: Don't even check the installed binary. --- diff --git a/ChangeLog b/ChangeLog index f6d6da7b8f..d720013cec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-10-09 Jim Meyering + + Now that we don't install su, don't make misleading suggestions. + * src/Makefile.am (install-exec-local) [$(INSTALL_SU) != yes]: + Don't suggest running "make install-root". + (uninstall-local) [$(INSTALL_SU) != yes]: Don't even check + the installed binary. + 2007-10-08 Jim Meyering When forming a truncated name, use the "[...]" prefix even for diff --git a/src/Makefile.am b/src/Makefile.am index fc3c7a1d43..bc67ff2b8f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -182,29 +182,35 @@ install-root: su$(EXEEXT) @$(install_su) install-exec-local: su$(EXEEXT) - @TMPFILE=$(DESTDIR)$(bindir)/.su-$$$$; \ - rm -f $$TMPFILE; \ - echo > $$TMPFILE; \ + @if test "$(INSTALL_SU)" = yes; then \ + TMPFILE=$(DESTDIR)$(bindir)/.su-$$$$; \ + rm -f $$TMPFILE; \ + echo > $$TMPFILE; \ ## See if we can create a setuid root executable in $(bindir). ## If not, then don't even try to install su. - can_create_suid_root_executable=no; \ - chown root $$TMPFILE > /dev/null 2>&1 \ - && chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \ - && can_create_suid_root_executable=yes; \ - rm -f $$TMPFILE; \ - if test $$can_create_suid_root_executable = yes; then \ - $(install_su); \ - else \ - echo "WARNING: insufficient access; not installing su"; \ - echo "NOTE: to install su, run 'make install-root' as root"; \ + can_create_suid_root_executable=no; \ + chown root $$TMPFILE > /dev/null 2>&1 \ + && chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \ + && can_create_suid_root_executable=yes; \ + rm -f $$TMPFILE; \ + if test $$can_create_suid_root_executable = yes; then \ + $(install_su); \ + else \ + echo "WARNING: insufficient access; not installing su"; \ + echo "NOTE: to install su, run 'make install-root' as root"; \ + fi; \ + else :; \ fi uninstall-local: # Remove su only if it's one we installed. - @if grep '$(PACKAGE_NAME)' $(installed_su) > /dev/null 2>&1; then \ - echo " rm -f $(installed_su)"; \ - rm -f $(installed_su); \ - else :; fi + @if test "$(INSTALL_SU)" = yes; then \ + if grep '$(PACKAGE_NAME)' $(installed_su) > /dev/null 2>&1; then \ + echo " rm -f $(installed_su)"; \ + rm -f $(installed_su); \ + else :; \ + fi; \ + fi copy_sources = copy.c cp-hash.c