diff options
| author | Ondřej Surý <ondrej@sury.org> | 2013-07-08 12:24:30 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2013-07-08 15:23:20 +0200 |
| commit | f015aa6894cea3cf598a3c22c838fe3382a41330 (patch) | |
| tree | 56ac56967becbc5c10e3947a1e07d62bc41a1228 /debian/php5-module.postinst | |
| parent | 1e27c70f7c178dbf9b573c0682de1b864821a388 (diff) | |
| download | php-f015aa6894cea3cf598a3c22c838fe3382a41330.tar.gz | |
Add preliminary php5-maintscript-helper scripts
Diffstat (limited to 'debian/php5-module.postinst')
| -rw-r--r-- | debian/php5-module.postinst | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/debian/php5-module.postinst b/debian/php5-module.postinst index 7e8c50f96..3c977a6ff 100644 --- a/debian/php5-module.postinst +++ b/debian/php5-module.postinst @@ -6,28 +6,31 @@ set -e if [ "$1" = "configure" ]; then inidir=/etc/php5/mods-available - for dsoname in @modules@; do - inifile=${dsoname}.ini - priority=$(sed -ne "s/^; priority=\([0-9]\+\)$/\\1/p" /usr/share/php5/@package@/${inifile}) - - # Register new conffile with UCF - ucf /usr/share/php5/@package@/${inifile} ${inidir}/${inifile} - ucfr --force php5-@package@ ${inidir}/${inifile} - - # Move pre-extension manager conffile - dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/${inifile} ${inidir}/${inifile} 5.4.0~rc6-1 -- "$@"; - - if [ -f "${inidir}/${inifile}.dpkg-new" ]; then - md5sum="$(md5sum ${inidir}/${inifile}.dpkg-new | sed -e 's/ .*//')" - old_md5sum="$(md5sum ${inidir}/${inifile} | sed -e 's/ .*//')" - if [ "$md5sum" = "$old_md5sum" ]; then - mv "${inidir}/${inifile}.dpkg-new" "${inidir}/${inifile}" - fi - fi - # Enable the module - php5enmod ${dsoname}/${priority:-20} - done + if [ -e /usr/share/php5/php5-maintscript-helper ] ; then + . /usr/share/php5/php5-maintscript-helper + + for dsoname in @modules@; do + inifile=${dsoname}.ini + + # Register new conffile with UCF + ucf /usr/share/php5/@package@/${inifile} ${inidir}/${inifile} + ucfr --force php5-@package@ ${inidir}/${inifile} + + # Move pre-extension manager conffile + dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/${inifile} ${inidir}/${inifile} 5.4.0~rc6-1 -- "$@"; + + if [ -f "${inidir}/${inifile}.dpkg-new" ]; then + md5sum="$(md5sum ${inidir}/${inifile}.dpkg-new | sed -e 's/ .*//')" + old_md5sum="$(md5sum ${inidir}/${inifile} | sed -e 's/ .*//')" + if [ "$md5sum" = "$old_md5sum" ]; then + mv "${inidir}/${inifile}.dpkg-new" "${inidir}/${inifile}" + fi + fi + + php5_invoke enmod ALL ${dsoname} restart + done + fi fi #DEBHELPER# |
