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, since
10 # we cannot do this during the @@PACKAGE@@ installation since the repository
13 # This functionality can be controlled by creating the $DEFAULTS_FILE and
14 # setting "repo_add_once" to "true" or "false" as desired. An empty
15 # $DEFAULTS_FILE is the same as setting the value to "false".
17 @@include@@rpm.include
20 DEFAULTS_FILE
="/etc/default/@@PACKAGE@@"
21 if [ -r "$DEFAULTS_FILE" ]; then
25 if [ "$repo_add_once" = "true" ]; then
26 determine_rpm_package_manager
28 # The initial install happens in the post-install scripts, but there have been
29 # reports of configuration problems, so just verify that everything looks
30 # good, and if not, try to install again.
31 verify_install
$PACKAGEMANAGER
33 install_
${PACKAGEMANAGER}
36 # Now do any extra configuration that couldn't be done by post-install.
37 case $PACKAGEMANAGER in
39 # We need to configure urpmi after the install has finished.
40 # See configure_urpmi() for details.
44 # It looks as though yast/zypper has a lock on the RPM DB during
45 # postinstall, so we cannot add the signing key with install_rpm_key().
46 # Instead, we attempt to do this here. If the user attempt to update before
47 # the cron job imports the key, Yast will grab the key from our server and
48 # prompt the user to accept the key.
54 # Before we quit auto-configuration, check that everything looks sane, since
55 # part of this happened during package install and we don't have the return
56 # value of that process.
57 verify_install
$PACKAGEMANAGER
59 sed -i -e 's/[[:space:]]*repo_add_once=.*/repo_add_once="false"/' \