diff options
author | Nicholas Guriev <guriev-ns@ya.ru> | 2017-04-28 08:11:56 +0300 |
---|---|---|
committer | Nicholas Guriev <guriev-ns@ya.ru> | 2017-04-28 08:11:56 +0300 |
commit | f33acd31ac972c43c17f298d7671ae80ec9157a2 (patch) | |
tree | cd47133e5fcb5d075df15ab9a25f1febdf8da5b6 /debian/scripts/httpd.sh | |
parent | 588535b3aee782df8ca56bd7cab10fa963baac50 (diff) |
Fix apache2-maintscript-helper script, it requires maintainer action
Diffstat (limited to 'debian/scripts/httpd.sh')
-rw-r--r-- | debian/scripts/httpd.sh | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/debian/scripts/httpd.sh b/debian/scripts/httpd.sh index 1483ac7..09f6c7c 100644 --- a/debian/scripts/httpd.sh +++ b/debian/scripts/httpd.sh @@ -131,13 +131,15 @@ apache2_packaging () # Try to (en/dis)able an apache2 configuration snippet. # Return error if (en/dis)abling tried and failed; caller *must* check status. # ARGS: -# $1={enable,disable} $2=package [$3=name_of_snippet_if_different_from_package] +# $1=maintscript-action (configure,abort-upgrade) +# $2={enable,disable} $3=package [$4=name_of_snippet_if_different_from_package] # try_chconf_apache2 () { - local action=${1} - local package=${2} - local confname=${3} + local maintscript_action=${1} + local action=${2} + local package=${3} + local confname=${4} local ret=0 _check_action_and_package ${action} ${package} "try_chconf_apache2" \ @@ -165,7 +167,7 @@ try_chconf_apache2 () local ahelper=/usr/share/apache2/apache2-maintscript-helper if [ -e $ahelper ] ; then - . $ahelper + . $ahelper $maintscript_action apache2_invoke ${confaction} ${confname}.conf && ret=$? || ret=$? if [ ${ret} -ne 0 ]; then install_msg ${package} warning \ @@ -201,13 +203,15 @@ try_chconf_apache2 () # Try to (en/dis)able a lighttpd configuration snippet. # Return error if (en/dis)abling tried and failed; caller *must* check status. # ARGS: -# $1={enable,disable} $2=package [$3=name_of_snippet_if_different_from_package] +# $1=maintscript-action (configure,abort-upgrade), not used +# $2={enable,disable} $3=package [$4=name_of_snippet_if_different_from_package] # try_chconf_lighttpd () { - local action=${1} - local package=${2} - local confname=${3} + local maintscript_action=${1} + local action=${2} + local package=${3} + local snippetname=${4} local ret=0 _check_action_and_package ${action} ${package} "try_chconf_lighttpd" \ @@ -227,8 +231,10 @@ try_chconf_lighttpd () return 0 fi - if [ "X${confname}" = "X" ]; then - confname=${package} + local confname=${package} + + if [ "X${snippetname}" != "X" ]; then + confname=${snippetname} fi # lighty-xxx-mod will return 2 if no action is needed; workaround this. |