From d74e88d5768b9fd42f32a995ccb44701349c8fd2 Mon Sep 17 00:00:00 2001 From: Bertrand Marc Date: Sun, 4 Aug 2013 14:22:57 +0200 Subject: gnunet-server.postinst: check the existence of a binary before changing its permissions (Closes: #688484). --- debian/gnunet-server.postinst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/gnunet-server.postinst b/debian/gnunet-server.postinst index 76fb9a8..18e0252 100644 --- a/debian/gnunet-server.postinst +++ b/debian/gnunet-server.postinst @@ -86,18 +86,20 @@ case "${1}" in /usr/bin/gnunet-helper-vpn do # only do something when no setting exists - if ! dpkg-statoverride --list $file >/dev/null 2>&1 + if ! dpkg-statoverride --list $file >/dev/null 2>&1 && [ -e $file ] then chown root:${_GROUPNAME} $file chmod 4754 $file fi done - if ! dpkg-statoverride --list /usr/bin/gnunet-helper-dns >/dev/null 2>&1 + if ! dpkg-statoverride --list /usr/bin/gnunet-helper-dns >/dev/null 2>&1 \ + && [ -e /usr/bin/gnunet-helper-dns ] then chown root:${GNUNETDNS_GROUP} /usr/bin/gnunet-helper-dns chmod 4754 /usr/bin/gnunet-helper-dns fi - if ! dpkg-statoverride --list /usr/bin/gnunet-service-dns >/dev/null 2>&1 + if ! dpkg-statoverride --list /usr/bin/gnunet-service-dns >/dev/null 2>&1 \ + && [ -e /usr/bin/gnunet-service-dns ] then chown ${_USERNAME}:${GNUNETDNS_GROUP} /usr/bin/gnunet-service-dns chmod 2754 /usr/bin/gnunet-service-dns -- cgit v1.2.3-18-g5258