aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-29 19:42:19 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-29 19:42:19 +0000
commit53f83d68fb0e7a12b819f91e21bb85917de6e09a (patch)
treef319f5d94452a703f1dab5d1025ca3d7f1e34768 /archival
parent5e43d8591b50905e8bef8b30984b7633bcdf07ad (diff)
downloadbusybox-53f83d68fb0e7a12b819f91e21bb85917de6e09a.tar.gz
dpkg: run_package_script() returns 0 if all ok and non-zero if failure.
The result code was checked incorrectly in two places. (from "Kim B. Heino" <Kim.Heino@bluegiga.com>)
Diffstat (limited to 'archival')
-rw-r--r--archival/dpkg.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 0a42deb39..c64410096 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1306,14 +1306,12 @@ static void remove_package(const unsigned package_num, int noisy)
char **exclude_files;
char list_name[package_name_length + 25];
char conffile_name[package_name_length + 30];
- int return_value;
if (noisy)
printf("Removing %s (%s)...\n", package_name, package_version);
/* run prerm script */
- return_value = run_package_script(package_name, "prerm");
- if (return_value == -1) {
+ if (run_package_script(package_name, "prerm") != 0) {
bb_error_msg_and_die("script failed, prerm failure");
}
@@ -1381,8 +1379,8 @@ static void purge_package(const unsigned package_num)
free(exclude_files);
/* run postrm script */
- if (run_package_script(package_name, "postrm") == -1) {
- bb_error_msg_and_die("postrm fialure.. set status to what?");
+ if (run_package_script(package_name, "postrm") != 0) {
+ bb_error_msg_and_die("postrm failure.. set status to what?");
}
/* Change package status */