summaryrefslogtreecommitdiffstats
path: root/helper
diff options
context:
space:
mode:
authorSimon Rettberg2013-09-09 20:05:21 +0200
committerJonathan Bauer2013-09-30 13:22:05 +0200
commit228bac30bed83b79674ec985307b394a460a9bdd (patch)
tree52653b227252094784753f21185f71ab5632b726 /helper
parent[mltk] Add pkg-config to required dev-tools, add "exit 1" to qnd_exit just in... (diff)
downloadtm-scripts-228bac30bed83b79674ec985307b394a460a9bdd.tar.gz
tm-scripts-228bac30bed83b79674ec985307b394a460a9bdd.tar.xz
tm-scripts-228bac30bed83b79674ec985307b394a460a9bdd.zip
[helper/fileutil] Fix error handling in install_packages
Diffstat (limited to 'helper')
-rw-r--r--helper/fileutil.inc14
1 files changed, 7 insertions, 7 deletions
diff --git a/helper/fileutil.inc b/helper/fileutil.inc
index abab7903..9f5c110f 100644
--- a/helper/fileutil.inc
+++ b/helper/fileutil.inc
@@ -91,7 +91,7 @@ install_packages() {
if [ "x$LRET" == "x0" ]; then
# package installed
pdebug "$PKG installed!"
- elif [ "x$LRET" == "x1" ]; then
+ else
# package not installed
pdebug "$PKG not installed!"
if [ "x$PACKET_MANAGER" == "xapt" ]; then
@@ -100,10 +100,10 @@ install_packages() {
if [ "x$IRET" == "x0" ]; then
# $PGK was installed successfully
INSTALLED_PACKAGES+="$PKG "
- elif [ "x$IRET" == "x1" ]; then
+ else
# PKG was not installed
# TODO error handling
- pwarning "install_packages: apt-get failed with '$?' for package '$PKG'"
+ perror "install_packages: apt-get failed with '$IRET' for package '$PKG'"
fi
elif [ "x$PACKET_MANAGER" == "xzypper" ]; then
zypper --no-refresh --non-interactive install ${PKG}
@@ -111,10 +111,10 @@ install_packages() {
if [ "x$IRET" == "x0" ]; then
# $PGK was installed successfully
INSTALLED_PACKAGES+="$PKG "
- elif [ "x$IRET" == "x1" ]; then
+ else
# PKG was not installed
# TODO error handling
- pwarning "install_packages: zypper failed with '$?' for package '$PKG'"
+ perror "install_packages: zypper failed with '$IRET' for package '$PKG'"
fi
elif [ "x$PACKET_MANAGER" == "xyum" ]; then
yum --assumeyes install ${PKG}
@@ -122,10 +122,10 @@ install_packages() {
if [ "x$IRET" == "x0" ]; then
# $PGK was installed successfully
INSTALLED_PACKAGES+="$PKG "
- elif [ "x$IRET" == "x1" ]; then
+ else
# PKG was not installed
# TODO error handling
- pwarning "install_packages: yum failed with '$?' for package '$PKG'"
+ perror "install_packages: yum failed with '$IRET' for package '$PKG'"
fi
else
perror "No packet manager determined, this should not happen!"