summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-02-13 21:04:41 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-02-13 21:04:41 +0100
commit0ab5725af230a931e0392413230f878ff62acc76 (patch)
tree7de6cfd9d00b1f1d8a6b8bb3831f0a1e05985ae3
parenta74a6940a3c2a2643a71ba0e7d12cf4874b47378 (diff)
downloaditzks-install-script-0ab5725af230a931e0392413230f878ff62acc76.tar.gz
itzks-install-script-0ab5725af230a931e0392413230f878ff62acc76.tar.bz2
itzks-install-script-0ab5725af230a931e0392413230f878ff62acc76.zip
Avoid useless apt-get update, if some of the itzks packages are already installed.
-rwxr-xr-xinstall-itzks-workstation10
1 files changed, 4 insertions, 6 deletions
diff --git a/install-itzks-workstation b/install-itzks-workstation
index 2614509..6b09538 100755
--- a/install-itzks-workstation
+++ b/install-itzks-workstation
@@ -13,7 +13,7 @@ function apt_install_if_not() {
for pkg in $pkgs; do
[ -d "/usr/share/doc/$pkg" ] || install_pkgs="$install_pkgs $pkg"
done
- test -n "$install_pkgs" && apt-get install -y $install_pkgs || true
+ test -n "$install_pkgs" && apt-get install -y $install_pkgs
}
# Add user locadm if not already there
@@ -54,11 +54,9 @@ sed -r -i /etc/apt/sources.list -e "s@http.debian.net@httpredir.debian.org@g"
find /var/lib/apt/lists/ -type f -delete
# Get update and add itzks-keyring and itzks-systems-common package
-apt-get update
-apt_install_if_not itzks-keyring
-apt-get update
-apt_install_if_not itzks-systems-common
-apt-get update
+apt-get update 1>/dev/null
+apt_install_if_not itzks-keyring && apt-get update 1>/dev/null
+apt_install_if_not itzks-systems-common && apt-get update 1>/dev/null
# Install the itzks-systems-workstation package
apt_install_if_not ocsinventory-agent