MT#4697 MT#6253 Replaced reset with clear

We have an error "reset: standard error: Invalid argument" in header of
CE install CD, so replated reset with clear which worked well for long time
during the nightly builds.

Also removed all the additional calls for logo() function.
(I have no ideas what can be the reason of broken layout MT#4697,
spent a lot of time trying to catch it, it comes time-2-time,
so currently minimised amount of any functions calls during printing logo).
I hope to catch this one day and fix it in prtoper way.
ksolomko/vlan
Alexander Lutay 12 years ago
parent 014cebbfa8
commit 45bf9f2024

@ -130,21 +130,6 @@ loadNfsIpArray() {
[ "$n" == "7" ] && return 0 || return 1 [ "$n" == "7" ] && return 0 || return 1
} }
logo() {
cat <<-EOF
+++ Grml-Sipwise Deployment +++
$(cat /etc/grml_version)
Host IP(s): $(ip-screen) | Deployment version: $SCRIPT_VERSION
$(lscpu | awk '/^CPU\(s\)/ {print $2}') CPU(s) | $(/usr/bin/gawk '/MemTotal/{print $2}' /proc/meminfo)kB RAM | $CHASSIS
Install ngcp: $NGCP_INSTALLER | Install pro: $PRO_EDITION [$ROLE] | Install ce: $CE_EDITION
Installing $SP_VERSION_STR platform | Debian: $DEBIAN_RELEASE
Install IP: $INSTALL_IP | Started deployment at $(date)
EOF
}
grml_debootstrap_upgrade() { grml_debootstrap_upgrade() {
local required_version=0.62 local required_version=0.62
local present_version=$(dpkg-query --show --showformat='${Version}' grml-debootstrap) local present_version=$(dpkg-query --show --showformat='${Version}' grml-debootstrap)
@ -677,24 +662,30 @@ set_deploy_status "start"
start_seconds=$(cut -d . -f 1 /proc/uptime) start_seconds=$(cut -d . -f 1 /proc/uptime)
if "$LOGO" ; then if "$LOGO" ; then
# reset terminal, see MT#4697 disable_trace
if checkBootParam debugmode ; then GRML_INFO=$(cat /etc/grml_version)
clear IP_INFO=$(ip-screen)
else CPU_INFO=$(lscpu | awk '/^CPU\(s\)/ {print $2}')
reset RAM_INFO=$(/usr/bin/gawk '/MemTotal/{print $2}' /proc/meminfo)
fi DATE_INFO=$(date)
# color # color
echo -ne "\ec\e[1;32m" echo -ne "\ec\e[1;32m"
# temporary disable trace, see MT#4697 clear
disable_trace
#print logo #print logo
logo echo "+++ Grml-Sipwise Deployment +++"
# restore trace if necessary, see MT#4697 echo ""
enable_trace echo "$GRML_INFO"
echo "Host IP(s): $IP_INFO | Deployment version: $SCRIPT_VERSION"
echo "$CPU_INFO CPU(s) | ${RAM_INFO}kB RAM | $CHASSIS"
echo ""
echo "Install ngcp: $NGCP_INSTALLER | Install pro: $PRO_EDITION [$ROLE] | Install ce: $CE_EDITION"
echo "Installing $SP_VERSION_STR platform | Debian: $DEBIAN_RELEASE"
echo "Install IP: $INSTALL_IP | Started deployment at $DATE_INFO"
# number of lines # number of lines
echo -ne "\e[10;0r" echo -ne "\e[10;0r"
# reset color # reset color
echo -ne "\e[9B\e[1;m" echo -ne "\e[9B\e[1;m"
enable_trace
fi fi
if "$PRO_EDITION" ; then if "$PRO_EDITION" ; then

Loading…
Cancel
Save