From: Bart Polot Date: Fri, 3 Aug 2012 14:00:04 +0000 (+0000) Subject: - fix installscript for sudo when root X-Git-Tag: initial-import-from-subversion-38251~12250 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2aab65fd2faa1a83a64888c79813b8cb646a1f77;p=oweals%2Fgnunet.git - fix installscript for sudo when root --- diff --git a/src/gns/nss/Makefile.am b/src/gns/nss/Makefile.am index d05b3b8ac..f658832b8 100644 --- a/src/gns/nss/Makefile.am +++ b/src/gns/nss/Makefile.am @@ -54,10 +54,11 @@ libnss_gns6_la_LDFLAGS=$(libnss_gns_la_LDFLAGS) if !MINGW if HAVE_SUDO install-data-hook: - $(top_srcdir)/src/gns/nss/install-nss-plugin.sh $(SUDO_BINARY) $(SHELL) $(top_builddir) $(nssdir) + $(top_srcdir)/src/gns/nss/install-nss-plugin.sh $(SHELL) $(top_builddir) $(nssdir) $(SUDO_BINARY) uninstall-hook: $(top_srcdir)/src/gns/nss/uninstall-nss-plugin.sh $(SUDO_BINARY) $(nssdir) + endif else install-data-hook: diff --git a/src/gns/nss/install-nss-plugin.sh b/src/gns/nss/install-nss-plugin.sh index cbf352963..293786bc5 100755 --- a/src/gns/nss/install-nss-plugin.sh +++ b/src/gns/nss/install-nss-plugin.sh @@ -1,13 +1,9 @@ #!/bin/bash -# $1 - sudo binary (empty if root) -# $2 - shell -# $3 - top_builddir -# $4 - nssdir -if [ "`whoami`" = "root" ]; then - $1 $2/libtool --finish $3 - rm -f $3/libnss_gns.la $3/libnss_gns4.la $3/libnss_gns6.la -else - $1 $2 $3/libtool --finish $4 - $1 rm -f $4/libnss_gns.la $4/libnss_gns4.la $4/libnss_gns6.la -fi +# $1 - shell +# $2 - top_builddir +# $3 - nssdir +# $4 - sudo binary (empty if root) +$4 $1 $2/libtool --finish $3 +$4 rm -f $3/libnss_gns.la $3/libnss_gns4.la $3/libnss_gns6.la +