summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader
diff options
context:
space:
mode:
authorSimon Rettberg2018-04-20 13:15:30 +0200
committerSimon Rettberg2018-04-20 13:15:30 +0200
commitb8f9d34d79c1216afd7f5e3460439ed4204eeae8 (patch)
treebb1a6b68ed452fb5a0e31bbda9f706cc0bd3f66d /satellit_upgrader
parent[SSUS] Replace atftpd by tftpd-hpa (diff)
downloadsetup-scripts-b8f9d34d79c1216afd7f5e3460439ed4204eeae8.tar.gz
setup-scripts-b8f9d34d79c1216afd7f5e3460439ed4204eeae8.tar.xz
setup-scripts-b8f9d34d79c1216afd7f5e3460439ed4204eeae8.zip
[SSUS] Use failprint everywhere
Diffstat (limited to 'satellit_upgrader')
-rw-r--r--satellit_upgrader/updater.template.sh17
1 files changed, 4 insertions, 13 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index 221ab42..93638e6 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -476,20 +476,17 @@ if ! id -u dnbd3 &> /dev/null; then
dnbd3group=10002
echo "Creating dnbd3 group with gid $dnbd3group"
groupadd -g "$dnbd3group" dnbd3 || perror "Could not add dnbd3 group!"
- echo "Group added"
else
echo "Using existing group dnbd3 with gid $dnbd3group"
fi
echo "Adding user dnbd3"
useradd --no-create-home -d /nonexistent -s /bin/false --gid "$dnbd3group" --uid 10002 dnbd3 || perror "Could not add user dnbd3!"
- echo "User added"
fi
if ! dpkg -l "$PACKAGE_LIBJANSSON" | grep -q "^ii\\s.*$PACKAGE_LIBJANSSON"; then
echo "Installing $PACKAGE_LIBJANSSON"
- if ! apt-get install -y "$PACKAGE_LIBJANSSON" &> "$TMPDIR/apt.log"; then
- cat "$TMPDIR/apt.log"
+ if ! failprint apt-get install -y "$PACKAGE_LIBJANSSON"; then
pwarning "*"
pwarning "* Warning: Could not install $PACKAGE_LIBJANSSON!"
pwarning "*"
@@ -497,8 +494,6 @@ if ! dpkg -l "$PACKAGE_LIBJANSSON" | grep -q "^ii\\s.*$PACKAGE_LIBJANSSON"; then
pwarning "* Please do either \"apt-get install $PACKAGE_LIBJANSSON\" by hand or"
pwarning "* install $PACKAGE_LIBJANSSON otherwise."
pwarning "*"
- else
- echo "Installed"
fi
fi
@@ -516,7 +511,6 @@ fi
if diffcp "dnbd3/dnbd3-server.service" "/etc/systemd/system/dnbd3-server.service"; then
ln -s -f "../dnbd3-server.service" "/etc/systemd/system/multi-user.target.wants/"
systemctl daemon-reload
- echo "Service file replaced"
fi
# ************************** ldadp *************************
@@ -537,7 +531,6 @@ if [ -n "$TGZ_LDADP" ]; then
if [ "x$OLD" != "x$NEW" ]; then
killall ldadp 2>/dev/null && pwarning "LDAP/AD Proxy was killed. Client logins might not work for a couple of minutes (see Server Status in webif)"
fi
- echo "LDADP upgrade complete"
fi
# ************************** tmate ************************
@@ -545,13 +538,11 @@ if ! which tmate > /dev/null 2>&1; then
echo "* Installing tmate"
echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/10-added_repos.list
echo "Running apt update..."
- if ! apt-get update > "$TMPDIR/apt.log" 2>&1; then
- cat "$TMPDIR/apt.log"
- pwarning "Adding backborts repo: update failed"
+ if ! failprint apt-get update; then
+ pwarning "Adding backports repo: update failed"
fi
echo "Installing package..."
- if ! apt-get install -y tmate > "$TMPDIR/apt.log" 2>&1; then
- cat "$TMPDIR/apt.log"
+ if ! failprint apt-get install -y tmate; then
pwarning "Could not install tmate. Easy remote assistance will not be available."
pwarning "Please check whether repo 'jessie-backports' was added and install by hand."
fi