From c0aaa47acdd6106c449a70360992db3f795772ca Mon Sep 17 00:00:00 2001 From: Axel ROGER Date: Tue, 22 Jan 2013 10:17:15 +0000 Subject: [PATCH] Fixes #1407 : probleme deploiement inclusion alternc-sudoers --- debian/alternc.postinst | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/debian/alternc.postinst b/debian/alternc.postinst index 913b9484..753bdb22 100644 --- a/debian/alternc.postinst +++ b/debian/alternc.postinst @@ -240,14 +240,24 @@ EOF # Apache will not start without this file touch /var/alternc/apache-vhost/vhosts_all.conf - #sudo stuff allowing alterncpanel to use quota - if [ -d /etc/sudoers.d ]; then - cp /etc/alternc/alternc-sudoers /etc/sudoers.d/alternc-sudoers - chmod 0440 /etc/sudoers.d/alternc-sudoers - else - echo "running an older version of sudo" - #FIXME - echo "copy content of /usr/share/doc/examples/example.sudoers into /etc/sudoers.d for to run properly" + #sudo stuff allowing alterncpanel to use quota + if [ -d /etc/sudoers.d ]; then + cp /etc/alternc/alternc-sudoers /etc/sudoers.d/alternc-sudoers + chmod 0440 /etc/sudoers.d/alternc-sudoers + if ! grep -q '#includedir /etc/sudoers.d' "/etc/sudoers"; then + echo "*************************************************" + echo "* /!\ WARNING /!\ *" + echo "* Please add yourself the following directive : *" + echo "* #includedir /etc/sudoers.d *" + echo "* in file /etc/sudoers (use sudoedit command) *" + echo "* Else you'll have troubles with some features *" + echo "* of AlternC *" + echo "*************************************************" + fi + else + echo "running an older version of sudo" + #FIXME + echo "copy content of /usr/share/doc/examples/example.sudoers into /etc/sudoers.d to run properly" fi # important: postinst freezes without that: