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
Recent comments
8 hours 32 min ago
15 hours 13 min ago
19 hours 3 min ago
20 hours 42 min ago
1 day 5 hours ago
1 day 14 hours ago
1 day 15 hours ago
1 day 18 hours ago
1 day 23 hours ago
1 day 23 hours ago