[23093] | 1 | #!/bin/sh |
---|
[23946] | 2 | # Athena installer script. |
---|
[23476] | 3 | # Maintainer: debathena@mit.edu |
---|
[23492] | 4 | # Based on original Debathena installer script by: Tim Abbott <tabbott@mit.edu> |
---|
[23093] | 5 | |
---|
[23492] | 6 | # Download this to a Debian or Ubuntu machine and run it as root. It can |
---|
[23093] | 7 | # be downloaded with: |
---|
[23831] | 8 | # wget -N http://debathena.mit.edu/install-debathena.sh |
---|
[23093] | 9 | |
---|
| 10 | set -e |
---|
| 11 | |
---|
[23946] | 12 | # If we run with the noninteractive frontend, mark Debconf questions as |
---|
| 13 | # seen, so you don't see all the suppressed questions next time you |
---|
| 14 | # upgrade that package, or worse, upgrade releases. |
---|
| 15 | export DEBCONF_NONINTERACTIVE_SEEN=true |
---|
[25437] | 16 | export DEBIAN_FRONTEND=noninteractive |
---|
[23946] | 17 | |
---|
[23093] | 18 | output() { |
---|
| 19 | printf '\033[38m'; echo "$@"; printf '\033[0m' |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | error() { |
---|
| 23 | printf '\033[31m'; echo "$@"; printf '\033[0m' |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | ask() { |
---|
| 27 | answer='' |
---|
| 28 | while [ y != "$answer" -a n != "$answer" ]; do |
---|
| 29 | printf '\033[38m'; echo -n "$1"; printf '\033[0m' |
---|
| 30 | read answer |
---|
[24912] | 31 | [ Y = "$answer" ] && answer=y |
---|
| 32 | [ N = "$answer" ] && answer=n |
---|
[23093] | 33 | [ -z "$answer" ] && answer=$2 |
---|
| 34 | done |
---|
| 35 | output "" |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | if [ `id -u` != "0" ]; then |
---|
[23492] | 39 | error "You must run the Debathena installer as root." |
---|
[24010] | 40 | if [ -x /usr/bin/sudo ]; then |
---|
[24009] | 41 | error "Try running 'sudo $0'." |
---|
| 42 | fi |
---|
[23492] | 43 | exit 1 |
---|
[23093] | 44 | fi |
---|
| 45 | |
---|
[25492] | 46 | pxetype= |
---|
| 47 | if test -f /root/pxe-install-flag ; then |
---|
| 48 | pxetype=`head -1 /root/pxe-install-flag` |
---|
| 49 | fi |
---|
| 50 | |
---|
[25346] | 51 | have_lsbrelease="$(dpkg-query -W -f '${Status}' lsb-release 2>/dev/null)" |
---|
| 52 | if [ "$have_lsbrelease" != "install ok installed" ]; then |
---|
| 53 | echo "The installer requires the 'lsb-release' package to determine" |
---|
| 54 | echo "whether or not installation can proceed." |
---|
| 55 | ask "Is it ok to install this package now? [Y/n] " y |
---|
| 56 | if [ y = "$answer" ]; then |
---|
| 57 | if ! apt-get -qq update && apt-get -qqy install lsb-release; then |
---|
| 58 | error "Could not install lsb-release. Try installing it manually." |
---|
| 59 | exit 1 |
---|
| 60 | fi |
---|
| 61 | else |
---|
| 62 | error "Sorry, lsb-release is required. Cannot continue." |
---|
| 63 | exit 1 |
---|
| 64 | fi |
---|
| 65 | fi |
---|
| 66 | distro=`lsb_release -cs` |
---|
| 67 | case $distro in |
---|
[25464] | 68 | squeeze) |
---|
[25346] | 69 | ;; |
---|
[25485] | 70 | hardy|lucid|natty|oneiric) |
---|
[25346] | 71 | ubuntu=yes |
---|
| 72 | ;; |
---|
[25485] | 73 | precise) |
---|
| 74 | ubuntu=yes |
---|
[25492] | 75 | output "The release you are running ($distro) is not fully supported" |
---|
[25485] | 76 | output "and installing Debathena on it is probably a bad idea." |
---|
[25492] | 77 | if ! test -f /root/pxe-install-flag; then |
---|
| 78 | ask "Are you sure you want to proceed? [y/N] " n |
---|
| 79 | [ y != "$answer" ] && exit 1 |
---|
[25485] | 80 | fi |
---|
| 81 | ;; |
---|
| 82 | lenny|intrepid|jaunty|karmic|maverick) |
---|
| 83 | error "The release you are running is no longer supported." |
---|
| 84 | error "Generally, Debathena de-supports releases when they are no longer" |
---|
| 85 | error "supported by upstream. If you believe you received this message" |
---|
| 86 | error "in error, please contact debathena@mit.edu." |
---|
| 87 | exit 1 |
---|
| 88 | ;; |
---|
[25346] | 89 | *) |
---|
| 90 | error "Unsupported release codename: $distro" |
---|
| 91 | error "Sorry, Debathena does not support installation on this release at this time." |
---|
| 92 | error "(New releases may not be supported immediately after their release)." |
---|
| 93 | error "If you believe you are running a supported release or have questions," |
---|
| 94 | error "please contact debathena@mit.edu" |
---|
| 95 | exit 1 |
---|
| 96 | ;; |
---|
| 97 | esac |
---|
| 98 | |
---|
[25371] | 99 | laptop=no |
---|
| 100 | wifi=no |
---|
| 101 | if [ -x /usr/sbin/laptop-detect ] && /usr/sbin/laptop-detect 2>/dev/null; then |
---|
| 102 | laptop=yes |
---|
| 103 | fi |
---|
| 104 | |
---|
| 105 | if [ -x /usr/bin/nmcli ] && /usr/bin/nmcli dev status 2>/dev/null | awk '{print $2}' | grep -q 802-11-wireless; then |
---|
| 106 | wifi=yes |
---|
| 107 | fi |
---|
| 108 | |
---|
[23492] | 109 | echo "Welcome to the Debathena installer." |
---|
[23093] | 110 | echo "" |
---|
[23604] | 111 | echo "Please choose the category which best suits your needs. Each category" |
---|
[23093] | 112 | echo "in this list includes the functionality of the previous ones. See the" |
---|
[23957] | 113 | echo "documentation at http://debathena.mit.edu for more information." |
---|
[23093] | 114 | echo "" |
---|
[23967] | 115 | echo " standard: Athena client software and customizations" |
---|
| 116 | echo " Recommended for laptops and single-user computers." |
---|
| 117 | echo " login: Allow Athena accounts to log into your machine" |
---|
| 118 | echo " Recommended for private remote-access servers." |
---|
[23678] | 119 | echo " login-graphical: Athena graphical login customizations" |
---|
[23967] | 120 | echo " Recommended for private multi-user desktops." |
---|
| 121 | echo " workstation: Graphical workstation with automatic updates" |
---|
[23969] | 122 | echo " Recommended for auto-managed cluster-like systems." |
---|
[23093] | 123 | echo "" |
---|
| 124 | |
---|
[25371] | 125 | if [ "$laptop" = "yes" ] || [ "$wifi" = "yes" ]; then |
---|
| 126 | cat <<EOF |
---|
| 127 | This machine appears to be a laptop or has at least one wireless |
---|
| 128 | network device. You probably want to choose "standard" unless this |
---|
| 129 | device will have an uninterrupted network connection. |
---|
| 130 | EOF |
---|
| 131 | fi |
---|
| 132 | |
---|
[23476] | 133 | category="" |
---|
[25492] | 134 | if [ cluster = "$pxetype" ] ; then |
---|
| 135 | category=cluster ; |
---|
| 136 | echo "PXE cluster install detected, so installing \"cluster\"." |
---|
[23476] | 137 | fi |
---|
[23135] | 138 | while [ standard != "$category" -a login != "$category" -a \ |
---|
[23797] | 139 | login-graphical != "$category" -a workstation != "$category" -a \ |
---|
| 140 | cluster != "$category" ]; do |
---|
[23093] | 141 | output -n "Please choose a category or press control-C to abort: " |
---|
| 142 | read category |
---|
| 143 | done |
---|
| 144 | mainpackage=debathena-$category |
---|
| 145 | |
---|
[23187] | 146 | csoft=no |
---|
[23460] | 147 | tsoft=no |
---|
[24786] | 148 | resolvconfhack=no |
---|
[23247] | 149 | echo "The extra-software package installs a standard set of software" |
---|
[23093] | 150 | echo "determined to be of interest to MIT users, such as LaTeX. It is pretty" |
---|
[23247] | 151 | echo "big (several gigabytes, possibly more)." |
---|
[23093] | 152 | echo "" |
---|
[24937] | 153 | echo "Note: This package may include software with additional license terms." |
---|
| 154 | echo " By installing it, you are agreeing to the terms of these licenses." |
---|
| 155 | echo " For more information, please see http://debathena.mit.edu/licensing" |
---|
[23872] | 156 | echo "" |
---|
[24358] | 157 | if [ cluster = $category -o workstation = $category ] ; then |
---|
[24786] | 158 | # See Trac #648 and LP:471975 |
---|
| 159 | resolvconfhack=yes |
---|
[24358] | 160 | echo "The extra-software package is required for '$category' and will be installed." |
---|
[23187] | 161 | csoft=yes |
---|
[23469] | 162 | # Not setting tsoft=yes here; -cluster will pull it in anyway. |
---|
[23460] | 163 | else |
---|
| 164 | ask "Do you want the extra-software package [y/N]? " n |
---|
| 165 | if [ y = "$answer" ]; then |
---|
| 166 | csoft=yes |
---|
[23492] | 167 | fi |
---|
[23093] | 168 | fi |
---|
[23876] | 169 | if [ yes = "$csoft" ]; then |
---|
[23872] | 170 | # Preseed an answer to the java license query, which license was already accepted |
---|
| 171 | # at install time: |
---|
| 172 | echo "sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true" |debconf-set-selections |
---|
| 173 | fi |
---|
[23093] | 174 | |
---|
[25333] | 175 | if [ "$(cat /sys/class/dmi/id/product_name)" = "OptiPlex 790" ]; then |
---|
| 176 | noacpi=y |
---|
| 177 | if [ "$category" != "cluster" ]; then |
---|
[25337] | 178 | echo |
---|
[25333] | 179 | echo "The Dell 790 sometimes has problems rebooting. The best way to" |
---|
[25345] | 180 | echo "work around this is to pass 'reboot=pci' at boot time." |
---|
| 181 | echo "This change will be made in your GRUB (bootloader) configuration." |
---|
[25333] | 182 | ask "Is it ok to do this now? [Y/n] " y |
---|
| 183 | if [ y != "$answer" ]; then |
---|
| 184 | noacpi=n |
---|
| 185 | fi |
---|
| 186 | fi |
---|
[25339] | 187 | if [ "$noacpi" = "y" ] && ! grep -q "Added by install-debathena.sh to address reboot issues on the Dell 790" /etc/default/grub; then |
---|
[25337] | 188 | cat >> /etc/default/grub << 'EOF' |
---|
| 189 | |
---|
| 190 | # Added by install-debathena.sh to address reboot issues on the Dell 790 |
---|
[25340] | 191 | GRUB_CMDLINE_LINUX="reboot=pci $GRUB_CMDLINE_LINUX" |
---|
[25337] | 192 | EOF |
---|
| 193 | update-grub |
---|
[25333] | 194 | fi |
---|
| 195 | fi |
---|
| 196 | |
---|
[23093] | 197 | echo "A summary of your choices:" |
---|
[23187] | 198 | echo " Category: $category" |
---|
[23247] | 199 | echo " Extra-software package: $csoft" |
---|
[23460] | 200 | echo " Third-party software package: $tsoft" |
---|
[23093] | 201 | echo "" |
---|
[25150] | 202 | if [ "$pxetype" = "cluster" ] ; then |
---|
| 203 | if wget -q http://athena10.mit.edu/installer/installing.txt; then |
---|
| 204 | cat installing.txt > /dev/tty6 |
---|
[25245] | 205 | date > /dev/tty6 |
---|
[25150] | 206 | chvt 6 |
---|
| 207 | fi |
---|
[24903] | 208 | # Divert the default background and install our own so that failed machines |
---|
| 209 | # are more conspicuous |
---|
| 210 | echo "Diverting default background..." |
---|
| 211 | bgimage=/usr/share/backgrounds/warty-final-ubuntu.png |
---|
| 212 | divertedbg=no |
---|
| 213 | if dpkg-divert --divert ${bgimage}.debathena --rename $bgimage; then |
---|
| 214 | divertedbg=yes |
---|
| 215 | if ! wget -N -O $bgimage http://debathena.mit.edu/error-background.png; then |
---|
| 216 | echo "Hrm, that didn't work. Oh well..." |
---|
| 217 | dpkg-divert --rename --remove $bgimage |
---|
| 218 | divertedbg=no |
---|
| 219 | fi |
---|
| 220 | fi |
---|
| 221 | |
---|
[23460] | 222 | # Setup for package installs in a chrooted immediately-postinstall environment. |
---|
| 223 | echo "Setting locale." |
---|
| 224 | export LANG |
---|
| 225 | . /etc/default/locale |
---|
| 226 | echo "LANG set to $LANG." |
---|
| 227 | echo "Mounting /proc." |
---|
| 228 | mount /proc 2> /dev/null || : |
---|
| 229 | # Clear toxic environment settings inherited from the installer. |
---|
| 230 | unset DEBCONF_REDIR |
---|
| 231 | unset DEBIAN_HAS_FRONTEND |
---|
[23476] | 232 | if [ cluster = "$pxetype" ] ; then |
---|
| 233 | # Network, LVM, and display config that's specific to PXE cluster installs. |
---|
| 234 | # If someone is installing -cluster on an already-installed machine, it's |
---|
| 235 | # assumed that this config has already happened and shouldn't be stomped on. |
---|
[23093] | 236 | |
---|
[23479] | 237 | # Configure network based on the preseed file settings, if present. |
---|
[23867] | 238 | if test -f /root/debathena.preseed ; then |
---|
[23479] | 239 | # Switch to canonical hostname. |
---|
| 240 | ohostname=`cat /etc/hostname` |
---|
| 241 | # Hack to avoid installing debconf-get for just this. |
---|
[23875] | 242 | ipaddr=`grep netcfg/get_ipaddress /root/debathena.preseed|sed -e 's/.* //'` |
---|
| 243 | netmask=`grep netcfg/get_netmask /root/debathena.preseed|sed -e 's/.* //'` |
---|
| 244 | gateway=`grep netcfg/get_gateway /root/debathena.preseed|sed -e 's/.* //'` |
---|
[23479] | 245 | |
---|
| 246 | hostname=`host $ipaddr | \ |
---|
[23476] | 247 | sed 's#^.*domain name pointer \(.*\)$#\1#' | sed 's;\.*$;;' | \ |
---|
| 248 | tr '[A-Z]' '[a-z]'` |
---|
[23479] | 249 | if echo $hostname|grep -q "not found" ; then |
---|
| 250 | hostname="" |
---|
| 251 | printf "\a"; sleep 1 ; printf "\a"; sleep 1 ;printf "\a" |
---|
| 252 | echo "The IP address you selected, $ipaddr, does not have an associated" |
---|
| 253 | echo "hostname. Please confirm that you're using the correct address." |
---|
| 254 | while [ -z "$hostname" ] ; do |
---|
| 255 | echo -n "Enter fully qualified hostname [no default]: " |
---|
| 256 | read hostname |
---|
| 257 | done |
---|
| 258 | fi |
---|
| 259 | echo ${hostname%%.*} > /etc/hostname |
---|
| 260 | sed -e 's/\(127\.0\.1\.1[ ]*\).*/\1'"$hostname ${hostname%%.*}/" < /etc/hosts > /etc/hosts.new |
---|
| 261 | mv -f /etc/hosts.new /etc/hosts |
---|
| 262 | if grep -q dhcp /etc/network/interfaces ; then |
---|
| 263 | sed -e s/dhcp/static/ < /etc/network/interfaces > /etc/network/interfaces.new |
---|
| 264 | echo " address $ipaddr" >> /etc/network/interfaces.new |
---|
| 265 | echo " netmask $netmask" >> /etc/network/interfaces.new |
---|
| 266 | echo " gateway $gateway" >> /etc/network/interfaces.new |
---|
[23923] | 267 | echo " dns-nameservers 18.72.0.3 18.70.0.160 18.71.0.151" >> /etc/network/interfaces.new |
---|
[23479] | 268 | mv -f /etc/network/interfaces.new /etc/network/interfaces |
---|
| 269 | fi |
---|
| 270 | hostname ${hostname%%.*} |
---|
[23476] | 271 | fi |
---|
[23479] | 272 | |
---|
[23460] | 273 | fi |
---|
| 274 | else |
---|
| 275 | output "Press return to begin or control-C to abort" |
---|
| 276 | read dummy |
---|
| 277 | fi |
---|
| 278 | |
---|
[24925] | 279 | apt-get update |
---|
| 280 | |
---|
| 281 | output "Verifying machine is up to date..." |
---|
| 282 | pattern='^0 upgraded, 0 newly installed, 0 to remove' |
---|
| 283 | if ! apt-get --simulate --assume-yes dist-upgrade | grep -q "$pattern"; then |
---|
[24958] | 284 | if [ -n "$pxetype" ] ; then |
---|
| 285 | output "Forcing an upgrade" |
---|
| 286 | apt-get --assume-yes dist-upgrade |
---|
| 287 | else |
---|
| 288 | error "Your system is not up to date. Proceeding with an install at" |
---|
| 289 | error "this time could render your system unusable." |
---|
| 290 | error "Please run 'apt-get dist-upgrade' as root or use the GUI update" |
---|
| 291 | error "manager to ensure your system is up to date before continuing." |
---|
[25160] | 292 | error "NOTE: You do NOT need to upgrade to a newer release of Ubuntu", |
---|
| 293 | error "you merely need to ensure you have the latest software updates" |
---|
| 294 | error "for the current version." |
---|
[24958] | 295 | exit 1 |
---|
| 296 | fi |
---|
[24925] | 297 | fi |
---|
| 298 | |
---|
[24891] | 299 | if ! hash aptitude >/dev/null 2>&1; then |
---|
| 300 | output "Installing Debathena installer dependency: aptitude" |
---|
| 301 | apt-get -y install aptitude |
---|
| 302 | fi |
---|
| 303 | |
---|
[25346] | 304 | output "Installing Debathena installer dependencies: wget and dnsutils" |
---|
| 305 | aptitude -y install wget dnsutils |
---|
[24786] | 306 | if [ yes = "$resolvconfhack" ]; then |
---|
| 307 | output "Installing resolvconf ahead of time" |
---|
| 308 | aptitude -y install resolvconf |
---|
| 309 | fi |
---|
[23093] | 310 | |
---|
[25510] | 311 | # Only add our openafs component if DKMS isn't available |
---|
| 312 | openafs_component="" |
---|
[25106] | 313 | if aptitude show openafs-modules-dkms > /dev/null; then |
---|
[25510] | 314 | modules="openafs-modules-dkms" |
---|
| 315 | else |
---|
[25106] | 316 | openafs_component=" openafs" |
---|
| 317 | fi |
---|
| 318 | |
---|
[23492] | 319 | output "Adding the Debathena repository to the apt sources" |
---|
| 320 | output "(This may cause the update manager to claim new upgrades are available." |
---|
| 321 | output "Ignore them until this script is complete.)" |
---|
[24472] | 322 | sourceslist=/etc/apt/sources.list.d/debathena.list |
---|
[24791] | 323 | clustersourceslist=/etc/apt/sources.list.d/debathena.clusterinfo.list |
---|
| 324 | if [ -z "$hostname" ] ; then hostname=`hostname` ; fi |
---|
[25222] | 325 | |
---|
[25413] | 326 | if [ ! -e "$sourceslist" ] || ! grep -v ^# "$sourceslist" | grep -q debathena; then |
---|
[23093] | 327 | if [ -e "$sourceslist" ]; then |
---|
| 328 | echo "" >> $sourceslist |
---|
| 329 | fi |
---|
[25106] | 330 | echo "deb http://debathena.mit.edu/apt $distro debathena debathena-config debathena-system$openafs_component" >> $sourceslist |
---|
| 331 | echo "deb-src http://debathena.mit.edu/apt $distro debathena debathena-config debathena-system$openafs_component" >> $sourceslist |
---|
[23093] | 332 | fi |
---|
| 333 | |
---|
[25235] | 334 | # Note that hesiod may contain multiple apt_release tokens. We want to |
---|
| 335 | # include known repositories but make no assumptions about wanting |
---|
| 336 | # others. (For instances, "development" does @i{not} automatically |
---|
| 337 | # infer "proposed".) |
---|
[25238] | 338 | hescluster=$(dig +short +bufsize=2048 ${hostname}.cluster.ns.athena.mit.edu TXT) || hescluster="" |
---|
[24791] | 339 | |
---|
[25235] | 340 | aptexplained=false |
---|
| 341 | for hc in proposed development bleeding; do |
---|
[25238] | 342 | if echo "$hescluster" | grep -Fxq "\"apt_release $hc\""; then |
---|
[25235] | 343 | echo "Adding $distro-$hc apt repository." |
---|
| 344 | if [ "${aptexplained}" = false ] ; then |
---|
| 345 | echo "" >> $clustersourceslist |
---|
| 346 | echo "# This file is automatically updated by debathena-auto-update" >> $clustersourceslist |
---|
| 347 | echo "# based on your Hesiod cluster information. If you want to" >> $clustersourceslist |
---|
| 348 | echo "# make changes, do so in another file." >> $clustersourceslist |
---|
| 349 | aptexplained=true |
---|
| 350 | fi |
---|
| 351 | echo "" >> $clustersourceslist |
---|
| 352 | echo "deb http://debathena.mit.edu/apt $distro-${hc} debathena debathena-config debathena-system$openafs_component" >> $clustersourceslist |
---|
| 353 | echo "deb-src http://debathena.mit.edu/apt $distro-${hc} debathena debathena-config debathena-system$openafs_component" >> $clustersourceslist |
---|
| 354 | fi |
---|
| 355 | done |
---|
[24765] | 356 | |
---|
[23093] | 357 | if [ "$ubuntu" = "yes" ]; then |
---|
| 358 | output "Making sure the universe repository is enabled" |
---|
| 359 | sed -i 's,^# \(deb\(\-src\)* http://archive.ubuntu.com/ubuntu [[:alnum:]]* universe\)$,\1,' /etc/apt/sources.list |
---|
| 360 | fi |
---|
| 361 | |
---|
[23492] | 362 | output "Downloading the Debathena archive signing key" |
---|
[23831] | 363 | if ! wget -N http://debathena.mit.edu/apt/debathena-archive-keyring.asc ; then |
---|
[23492] | 364 | error "Download failed; terminating." |
---|
[23093] | 365 | exit 1 |
---|
| 366 | fi |
---|
[24334] | 367 | echo "fa787714d1ea439c28458aab64962f755e2bdee7a3520919a72b641458757fa3586fd269cc1dae8d99047e00b3df88db0826f0c99a1f5a8771618b3c0be8e3bd ./debathena-archive-keyring.asc" | \ |
---|
| 368 | sha512sum -c |
---|
[23500] | 369 | apt-key add debathena-archive-keyring.asc |
---|
| 370 | rm ./debathena-archive-keyring.asc |
---|
[23093] | 371 | |
---|
| 372 | apt-get update |
---|
| 373 | |
---|
[25106] | 374 | if [ -z "$modules" ]; then |
---|
| 375 | modules_want=$(dpkg-query -W -f '${Source}\t${Package}\n' 'linux-image-*' | \ |
---|
| 376 | sed -nre 's/^linux-(meta|latest[^\t]*)\tlinux-image-(.*)$/openafs-modules-\2/p') |
---|
| 377 | modules= |
---|
| 378 | for m in $modules_want; do |
---|
| 379 | aptitude show $m > /dev/null && modules="$modules $m" |
---|
| 380 | done |
---|
| 381 | fi |
---|
[23093] | 382 | |
---|
| 383 | if [ -z "$modules" ]; then |
---|
| 384 | error "An OpenAFS modules metapackage for your kernel is not available." |
---|
[23492] | 385 | error "Please use the manual installation instructions at" |
---|
[23957] | 386 | error "http://debathena.mit.edu/install" |
---|
[23492] | 387 | error "You will need to compile your own AFS modules as described at:" |
---|
[23957] | 388 | error "http://debathena.mit.edu/troubleshooting#openafs-custom" |
---|
[23492] | 389 | exit 1 |
---|
[23093] | 390 | fi |
---|
| 391 | |
---|
| 392 | output "Installing OpenAFS kernel metapackage" |
---|
| 393 | apt-get -y install $modules |
---|
| 394 | |
---|
[25336] | 395 | if [ "cluster" = "$category" ] || [ "workstation" = "$category" ] ; then |
---|
| 396 | output "Installing debathena-license-config" |
---|
| 397 | apt-get -y install debathena-license-config |
---|
| 398 | fi |
---|
| 399 | |
---|
[23187] | 400 | # Use the noninteractive frontend to install the main package. This |
---|
| 401 | # is so that AFS and Zephyr don't ask questions of the user which |
---|
| 402 | # debathena packages will later stomp on anyway. |
---|
[23492] | 403 | output "Installing main Debathena metapackage $mainpackage" |
---|
[23460] | 404 | |
---|
[25437] | 405 | aptitude -y install "$mainpackage" |
---|
[23187] | 406 | |
---|
| 407 | # Use the default front end and allow questions to be asked; otherwise |
---|
| 408 | # Java will fail to install since it has to present its license. |
---|
| 409 | if [ yes = "$csoft" ]; then |
---|
[23247] | 410 | output "Installing debathena-extra-software" |
---|
| 411 | DEBIAN_PRIORITY=critical aptitude -y install debathena-extra-software |
---|
[23187] | 412 | fi |
---|
[23460] | 413 | if [ yes = "$tsoft" ]; then |
---|
| 414 | output "Installing debathena-thirdparty" |
---|
| 415 | DEBIAN_PRIORITY=critical aptitude -y install debathena-thirdparty |
---|
| 416 | fi |
---|
[23910] | 417 | |
---|
| 418 | # Post-install cleanup for cluster systems. |
---|
[24903] | 419 | if [ "$divertedbg" = "yes" ]; then |
---|
| 420 | rm -f $bgimage |
---|
| 421 | if ! dpkg-divert --rename --remove $bgimage; then |
---|
| 422 | echo "Failed to remove diversion of background. You probably don't care." |
---|
| 423 | fi |
---|
| 424 | fi |
---|
| 425 | |
---|
[23910] | 426 | if [ cluster = "$category" ] ; then |
---|
| 427 | # Force an /etc/adjtime entry so there's no confusion about whether the |
---|
| 428 | # hardware clock is UTC or local. |
---|
| 429 | echo "Setting hardware clock to UTC." |
---|
| 430 | hwclock --systohc --utc |
---|
| 431 | fi |
---|