]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Now that we don't install su, don't make misleading suggestions.
authorJim Meyering <meyering@redhat.com>
Tue, 9 Oct 2007 07:33:48 +0000 (09:33 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 9 Oct 2007 07:35:30 +0000 (09:35 +0200)
* 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.

ChangeLog
src/Makefile.am

index f6d6da7b8fba8d4a3dfb42ff772cd57283ea103b..d720013cecebed59a5aae4891af9331c87075905 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-10-09  Jim Meyering  <meyering@redhat.com>
+
+       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  <meyering@redhat.com>
 
        When forming a truncated name, use the "[...]" prefix even for
index fc3c7a1d43938d030765e9e383b0f864f292d9a4..bc67ff2b8f4b91fd1212496fb71953b7b511c951 100644 (file)
@@ -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