1 #!/bin/sh 2 # 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 4 # Use of this source code is governed by a BSD-style license that can be 5 # found in the LICENSE file. 6 7 @@include@@../common/postinst.include 8 9 # Add to the alternatives system 10 # 11 # On Ubuntu 12.04, we have the following priorities 12 # (which can be obtain be installing browsers and running 13 # update-alternatives --query x-www-browser): 14 # 15 # /usr/bin/epiphany-browser 85 16 # /usr/bin/firefox 40 17 # /usr/bin/konqueror 30 18 # 19 # While we would expect these values to be keyed off the most popular 20 # browser (Firefox), in practice, we treat Epiphany as the lower bound, 21 # resulting in the following scheme: 22 23 CHANNEL=@@CHANNEL@@ 24 case $CHANNEL in 25 stable ) 26 # Good enough to be the default. 27 PRIORITY=200 28 ;; 29 beta ) 30 # Almost good enough to be the default. (Firefox stable should arguably be 31 # higher than this, but since that's below the "Epiphany threshold", we're 32 # not setting our priority below it. Anyone want to poke Firefox to raise 33 # their priority?) 34 PRIORITY=150 35 ;; 36 unstable ) 37 # Unstable, give it the "lowest" priority. 38 PRIORITY=120 39 ;; 40 * ) 41 PRIORITY=0 42 ;; 43 esac 44 45 update-alternatives --install /usr/bin/x-www-browser x-www-browser \ 46 /usr/bin/@@PACKAGE@@ $PRIORITY 47 update-alternatives --install /usr/bin/gnome-www-browser gnome-www-browser \ 48 /usr/bin/@@PACKAGE@@ $PRIORITY 49 50 @@include@@../common/apt.include 51 52 @@include@@../common/symlinks.include 53 54 remove_udev_symlinks 55 add_udev_symlinks 56 57 ## MAIN ## 58 if [ ! -e "$DEFAULTS_FILE" ]; then 59 echo 'repo_add_once="true"' > "$DEFAULTS_FILE" 60 echo 'repo_reenable_on_distupgrade="true"' >> "$DEFAULTS_FILE" 61 fi 62 63 # Run the cron job immediately to perform repository configuration. 64 nohup sh /etc/cron.daily/@@PACKAGE@@ > /dev/null 2>&1 & 65