diff options
| author | Ondřej Surý <ondrej@sury.org> | 2013-07-15 09:12:19 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2013-07-15 09:16:34 +0200 |
| commit | 6bb7b2b3a587b46296bb44fe8d145643d1537e93 (patch) | |
| tree | 6d2c869aaf9943727839d9703dc03acb83a4a7a3 /debian/php5enmod | |
| parent | f8eb1f7fefd882219d670fea27dfae7d8964c7d5 (diff) | |
| download | php-6bb7b2b3a587b46296bb44fe8d145643d1537e93.tar.gz | |
Re-create (and re-remove) conf.d symlinks when module is already enabled (disabled) (Closes: #716893)
Diffstat (limited to 'debian/php5enmod')
| -rw-r--r-- | debian/php5enmod | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/debian/php5enmod b/debian/php5enmod index 393bc9371..f720e5a75 100644 --- a/debian/php5enmod +++ b/debian/php5enmod @@ -120,9 +120,8 @@ enmod() { php5query -q -s $sapi -m $modname || module_state=$? case $module_state in - # module enabled + # module enabled, but re-enable the conf.d link just in case 0) - return 0 ;; # module not yet enabled 1) @@ -152,7 +151,12 @@ enmod() { esac if [ -d "/etc/php5/$sapi/conf.d" ]; then - ln -s "${live_link_content}" "${live_link}" + if [ ! -h "${live_link}" ]; then + ln -s "${live_link_content}" "${live_link}" + fi + else + warning "Directory /etc/php5/$sapi/conf.d doesn't exist, not enabling the module" + return 1 fi return 0 @@ -183,9 +187,8 @@ dismod() { # module enabled 0) ;; - # module not enabled + # module not enabled, but re-remove the link just in case 1|32|33) - return 0 ;; 34) warning "Not disabling module $modname for $sapi SAPI. The configuration was" @@ -200,7 +203,9 @@ dismod() { esac if [ -d "/etc/php5/$sapi/conf.d" ]; then - rm -f $live_link + if [ -h "$live_link" ]; then + rm -f "$live_link" + fi fi return 0 |
