Remove deprecated Ubuntu; updated changelog

Closes #11 and #13.  As mentioned in #11, support for Ubuntu should
return in the future, but not explicitly.  Rather, the core of A2SERVER
itself ashould be made to run on any OS distribution for which our
requirements are met.

The goal is that any OS-specific details should be part of OS-specific
packaging or handled by the user (editing MOTD/issue files, etc.)  We
can handle those details on Debian systems because we know how to do
that when packaging for Debian.  Ubuntu, Fedora, etc. packages will have
to make their own tweaks.  This commit doesn't do all of that, but it
does mean there's one fewer things we need to worry about during the
transition.
This commit is contained in:
T. Joseph Carter
2015-11-17 05:36:22 -08:00
parent 69d041eff6
commit 7cf972cc7d
7 changed files with 19 additions and 116 deletions
+1 -80
View File
@@ -1,9 +1,7 @@
#! /bin/bash
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
# --- Ubuntu Server console optimizaton (optional)
# This script helps when running on the Linux console within the VM.
# This script helps when running on the Linux console within a VirtualBox VM.
echo
@@ -27,80 +25,3 @@ if [[ $isDebian ]]; then
sudo /etc/init.d/console-setup restart &> /dev/null
fi
fi
# check that we're on Ubuntu
if [[ $(lsb_release -d 2> /dev/null | grep Ubuntu) ]]; then
# don't do any of this if we're logged in via SSH
if [[ $SSH_CLIENT || $REMOTEHOST ]]; then
echo "A2SERVER: Logged in via SSH,not performing console optimization."
echo "Run setup from the console if you want to optimize the console."
else
# if we've already done this stuff, don't do it again
if [[ ! -x /etc/update-motd.d/10-help-text ]]; then
echo "A2SERVER: Ubuntu console has already been optimized."
else
echo "Ubuntu console optimization for use in a virtual machine will:"
echo "- show the default username/password on the login screen"
echo "- remove the documentation URL and system statistics shown after login"
echo "- ensure the screen clears before showing the login prompt"
echo "- prevent the screen from dimming after 10 minutes (once logged in)"
echo "- eliminate a harmless but annoying startup error about piix_smbus"
echo "- fix an Ubuntu 10.04 issue with slow scrolling"
echo
if [[ ! $autoAnswerYes ]]; then
echo -n "Do you want to optimize the Ubuntu console? "
read
fi
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
echo "A2SERVER: Optimizing console..."
# remind the user how to log in (we're going for functionality here, not security)
if [[ ! $(grep $USER\/$password /etc/issue) ]]; then
sudo sed -i '/^Log in with.*$/d' /etc/issue
echo "Log in with '$USER' / '$password'." | sudo tee -a /etc/issue > /dev/null
echo | sudo tee -a /etc/issue > /dev/null
fi
# If after logging in, you don't like the documentation URL and
# system info (or an error about it) being displayed, type:
sudo chmod -x /etc/update-motd.d/10-help-text
sudo chmod -x /etc/update-motd.d/50-landscape-sysinfo
# If the screen doesn't clear for login after the boot messages, and
# you'd like it to, type:
sudo sed -i 's/X_DEFAULT=""/X_DEFAULT="quiet"/g' /etc/default/grub
sudo update-grub
# If you see a piix4_smbus error on startup, it is harmless, but if you
# want to eliminate it, type:
echo -e '\nblacklist i2c_piix4' \
| sudo tee -a /etc/modprobe.d/blacklist.conf > /dev/null
sudo update-initramfs -u -k all
# If you want to prevent the Ubuntu screen from going blank after ten
# minutes of inactivity (once you are logged in), type:
echo -e \
'\n[[ $SSH_CLIENT || $REMOTEHOST ]] || setterm -blank 0 -powersave off -powerdown 0' \
| sudo tee -a /etc/profile > /dev/null
setterm -blank 0 -powersave off -powerdown 0
# (note: These next lines addresses an issue only for Ubuntu 10.04.)
# Type "ps aux" and press return. If you see slow text scrolling, type:
if [[ "$(lsb_release -rs 2> /dev/null)" == "10.04" ]]; then
echo -e '\nblacklist vga16fb' \
| sudo tee -a /etc/modprobe.d/blacklist-framebuffer.conf > /dev/null
if [[ ! $SSH_CLIENT ]]; then
echo "Restarting now is recommended. To resume setup, log back"
echo -n "in, press up-arrow, and press return. Restart now? "
read; R=${REPLY:0:1}
[[ $R != "y" ]] && [[ $R != "Y" ]] || sudo shutdown -r now
fi
fi
fi
fi
fi
fi