From: Florian Forster Date: Thu, 10 Mar 2011 16:10:16 +0000 (+0100) Subject: src/Makefile.am: Make setcap and chmod fault-tolerant. X-Git-Tag: liboping-1.6.2~8^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=207d51d66b383b501c15cacd6a24d7013c8c6a1d;p=liboping.git src/Makefile.am: Make setcap and chmod fault-tolerant. This is required because this weird Debian fakeroot utility gives the impression as if the install was run by root, when in fact it isn't. What good this should do is beyond me. --- diff --git a/src/Makefile.am b/src/Makefile.am index 29e7d92..1326783 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -56,11 +56,11 @@ install-exec-hook: @if test "x0" = "x$$UID"; then \ if test "xLinux" = "x`uname -s`"; then \ echo "Setting CAP_NET_RAW capability on binaries."; \ - setcap cap_net_raw=ep $(DESTDIR)$(bindir)/oping; \ - setcap cap_net_raw=ep $(DESTDIR)$(bindir)/noping; \ + setcap cap_net_raw=ep $(DESTDIR)$(bindir)/oping || true; \ + setcap cap_net_raw=ep $(DESTDIR)$(bindir)/noping || true; \ else \ echo "Setting set-UID bit on binaries."; \ - chmod u+s $(DESTDIR)$(bindir)/oping; \ - chmod u+s $(DESTDIR)$(bindir)/noping; \ + chmod u+s $(DESTDIR)$(bindir)/oping || true; \ + chmod u+s $(DESTDIR)$(bindir)/noping || true; \ fi; \ fi