Skip to content

Commit

Permalink
Fix error messages ; cannot print color before slib.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Dec 8, 2022
1 parent e480058 commit 668bfa0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions virtualmin-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ while true; do
perl=/opt/csw/bin/perl
break
elif [ "$perl_attempted" = 1 ]; then
printf "Perl could not be installed. Cannot continue.\\n"
printf ".. Perl could not be installed. Cannot continue.\\n"
exit 2
fi
# couldn't find Perl, so we need to try to install it
Expand Down Expand Up @@ -346,7 +346,7 @@ fi
# is mounted noexec, this won't catch it.
TMPNOEXEC="$(grep $TMPDIR /etc/mtab | grep noexec)"
if [ -n "$TMPNOEXEC" ]; then
echo ".. $TMPDIR directory is mounted noexec. Cannot continue."
echo "Error: $TMPDIR directory is mounted noexec. Cannot continue."
exit 1
fi

Expand All @@ -362,15 +362,15 @@ fi
mkdir "$tempdir/files"
srcdir="$tempdir/files"
if ! cd "$srcdir"; then
echo "Failed to cd to $srcdir"
echo "Error: Failed to enter $srcdir temporary directory"
exit 1
fi

# Download the slib (source: http://github.com/virtualmin/slib)
# Lots of little utility functions.
$download "https://$upgrade_virtualmin_host/lib/slib.sh" >>$log 2>&1
if [ $? -ne 0 ]; then
echo "${RED}Error:${NORMAL} Failed to download utility function library. Cannot continue. Check your network connection and DNS settings."
echo "Error: Failed to download utility function library. Cannot continue. Check your network connection and DNS settings."
exit 1
fi
chmod +x slib.sh
Expand Down

0 comments on commit 668bfa0

Please sign in to comment.