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.
7 # This script is part of the @@PACKAGE@@ package.
9 # It creates the repository configuration file for package updates, and it
10 # monitors that config to see if it has been disabled by the overly aggressive
11 # distro upgrade process (e.g. intrepid -> jaunty). When this situation is
12 # detected, the respository will be re-enabled. If the respository is disabled
13 # for any other reason, this won't re-enable it.
15 # This functionality can be controlled by creating the $DEFAULTS_FILE and
16 # setting "repo_add_once" and/or "repo_reenable_on_distupgrade" to "true" or
17 # "false" as desired. An empty $DEFAULTS_FILE is the same as setting both values
20 @@include@@apt.include
23 DEFAULTS_FILE
="/etc/default/@@PACKAGE@@"
24 if [ -r "$DEFAULTS_FILE" ]; then
28 if [ "$repo_add_once" = "true" ]; then
32 # Sources creation succeeded, so stop trying.
33 if [ $RES -ne 2 ]; then
34 sed -i -e 's/[[:space:]]*repo_add_once=.*/repo_add_once="false"/' "$DEFAULTS_FILE"
40 if [ "$repo_reenable_on_distupgrade" = "true" ]; then