Skip to content

Commit

Permalink
Don't delete /etc/webmin on an upgrade failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Jun 6, 2013
1 parent 567b881 commit 430d7c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions makedebian.pl
Expand Up @@ -239,7 +239,7 @@
perl <<EOD;
$maketemp
EOD
if [ "\$1" != "upgrade" ]; then
if [ "\$1" != "upgrade" -a "\$1" != "abort-upgrade" ]; then
if [ "\$WEBMIN_PORT\" != \"\" ]; then
port=\$WEBMIN_PORT
else
Expand All @@ -260,7 +260,7 @@
print SCRIPT <<EOF;
#!/bin/sh
inetd=`grep "^inetd=" /etc/$baseproduct/miniserv.conf 2>/dev/null | sed -e 's/inetd=//g'`
if [ "\$1" = "upgrade" ]; then
if [ "\$1" = "upgrade" -a "\$1" != "abort-upgrade" ]; then
# Upgrading the package, so stop the old webmin properly
if [ "\$inetd" != "1" ]; then
/etc/$baseproduct/stop >/dev/null 2>&1 </dev/null
Expand Down Expand Up @@ -355,7 +355,7 @@
open(SCRIPT, ">$preuninstall_file");
print SCRIPT <<EOF;
#!/bin/sh
if [ "\$1" != "upgrade" ]; then
if [ "\$1" != "upgrade" -a "\$1" != "abort-upgrade" ]; then
grep root=/usr/share/$baseproduct /etc/$baseproduct/miniserv.conf >/dev/null 2>&1
if [ "\$?" = 0 ]; then
# Package is being removed, and no new version of webmin
Expand All @@ -376,7 +376,7 @@
open(SCRIPT, ">$postuninstall_file");
print SCRIPT <<EOF;
#!/bin/sh
if [ "\$1" != "upgrade" ]; then
if [ "\$1" != "upgrade" -a "\$1" != "abort-upgrade" ]; then
grep root=/usr/share/$baseproduct /etc/$baseproduct/miniserv.conf >/dev/null 2>&1
if [ "\$?" = 0 ]; then
# Package is being removed, and no new version of webmin
Expand Down

0 comments on commit 430d7c9

Please sign in to comment.