Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Feature Requests

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th April 2007, 13:46
lawrenceong lawrenceong is offline
Junior Member
 
Join Date: Apr 2007
Location: Sydney, Australia
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default Upgrade causes the removal of /root/ispconfig due to compile failure

Recently, i upgraded my Debian version from Sarge to Etch. As i was trying to upgrade the isp_config version from ISPConfig-2.2.11.tar.gz to ISPConfig-2.2.12.tar.gz, it basically removed everything in /root/ispconfig and .. nothing else, all due to a compilation failure.

The compilation error happened because the system was missing a new -dev package for mysql. Even though it is a compilation failure, it would be better if it did not remove /root/ispconfig and the install_ispconfig directory. This is equivalent to running rm -rf /root/ispconfig without a backup!

So how did this happen?

The setup2 script contains the following snippet of code:

Quote:
if [ "$install_art" == "upgrade" ]; then
cp -f /home/admispconfig/ispconfig/lib/config.inc.php ./
caselog "saved /home/admispconfig/ispconfig/lib/config.inc.php" "could not save /home/admispconfig/ispconfig/lib/config.inc.php"
cp -f /home/admispconfig/ispconfig/users ./
caselog "saved /home/admispconfig/ispconfig/users" "could not save /home/admispconfig/ispconfig/users"
cp -f /home/admispconfig/ispconfig/adminmail.txt ./
caselog "saved /home/admispconfig/ispconfig/adminmail.txt" "could not save /home/admispconfig/ispconfig/adminmail.txt"

tar -pczf root_ispconfig.tar.gz /root/ispconfig/ &> /dev/null
chmod 600 root_ispconfig.tar.gz &> /dev/null
caselog "created backup of directory /root/ispconfig/" "could not create backup of directory /root/ispconfig/"
tar -pczf home_admispconfig.tar.gz /home/admispconfig/ &> /dev/null
chmod 600 home_admispconfig.tar.gz &> /dev/null
caselog "created backup of directory /home/admispconfig/" "could not create backup of directory /home/admispconfig/"

rm -fr /root/ispconfig
caselog "deleted directory /root/ispconfig/" "could not delete directory /root/ispconfig/"
fi

cd compile_aps/
chmod 700 compile
./compile || (cd `pwd`/../.. && rm -fr install_ispconfig && exit 1)
cd ..
The text highlighted in red basically says:
  • If you do an upgrade, i would backup your /root/ispconfig to the current directory (usually where you run setup from (aka: the install_ispconfig directory)) and then remove the /root/ispconfig directory
  • On compile failure, remove the install_ispconfig directory

Well, the problem here is that if there is a compile failure, the /root/ispconfig directory and the backup file are both removed.... leaving you with a system with a broken ispconfig

Can we please have the feature where a compile failure does not rm -rf /root/ispconfig on upgrade?

Thanks,
Lawrence
Reply With Quote
Sponsored Links
  #2  
Old 18th April 2007, 14:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

The directory must be removed, otherwise the next installation or update attempt will fail.

Your problem is easily solved, run:

mkdir /root/ispconfig

and then unpack and run the setup script again. By the way, the backup of /root/ispconfig is not removed, it is in your /tmp directory.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 18th April 2007, 16:29
lawrenceong lawrenceong is offline
Junior Member
 
Join Date: Apr 2007
Location: Sydney, Australia
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till
The directory must be removed, otherwise the next installation or update attempt will fail.

Your problem is easily solved, run:

mkdir /root/ispconfig

and then unpack and run the setup script again.
I will try this out.

Quote:
Originally Posted by till
By the way, the backup of /root/ispconfig is not removed, it is in your /tmp directory.
I've checked /tmp and it's not there. This is the reason why. Check out the setup2 script.

Line 840 removed the install_ispconfig directory, before a copy of the backup was made to /tmp by install.php. This means there's nothing in /tmp.

Quote:
840 ./compile || (cd `pwd`/../.. && rm -fr install_ispconfig && exit 1)
install.php runs at line 876, so it never made that backup to /tmp.

Quote:
876 chmod 700 ./install.php
Excerpt from install.php

Quote:
caselog("mv -f root_ispconfig.tar.gz /tmp/root_ispconfig_".date("m_d_Y__H_i_s", $

Last edited by lawrenceong; 19th April 2007 at 05:12.
Reply With Quote
The Following User Says Thank You to lawrenceong For This Useful Post:
Trosan (22nd May 2007)
  #4  
Old 24th April 2007, 14:25
lawrenceong lawrenceong is offline
Junior Member
 
Join Date: Apr 2007
Location: Sydney, Australia
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
 
Default mkdir /root/ispconfig

Creating the directory /root/ispconfig will make the setup think that it is an upgrade and not touch any of your configuration files.

However, you would have lost all the custom configuration that you placed in the /root/ispconfig/isp/conf directory.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dovecot Auth. Failure spams Message log d3m0nic Installation/Configuration 4 20th October 2009 19:47


All times are GMT +2. The time now is 07:15.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.