Repository Scripts

downloads: 1081 | type: gz | size: 989 bytes
  • Released: Feb 29, 2008
  • Requires: B1 (BUBBA|server)

What is this?

This is two scripts that will make it easier to switch between the Excito and Debian repository.

Although the BUBBA|server uses Excito specific repositories, nothing is stopping you from using the Debian ones. The problem with these packages is that they may require user input and therefor aren’t suited for automatic installation like the one you get from the Bubba web interface. This means that you must restore the links to the Excito repository before you start an upgrade from the web interface or things may go wrong.

One of the scripts in this package is meant to be run as a cron job, and will check what repository is currently being active and restore it to the Excito repository if it is pointing at anything else. It will only restore the links if no user is logged on to bubba. This is to prevent it from restoring the links when you’re logged on and actually want it to point at another repo. The other script is used from command line to switch repository with a simple command.

Note that this program is compatible only with the older BUBBA|server (B1). The newer BUBBA servers (B2 and B3) already have the Debian repositories enabled by default .


Download the archive to your bubba and extract it in your home folder. You need to become root and copy restore_repo to /etc/cron.hourly and set_repo to /usr/bin. Next, make a copy of the original /etc/sources.list (the one which only points at Excito). Name this copy /etc/sources.excito. Make a second copy and name it /etc/sources.debian. Edit this file and enable the debian repositories by removing the leading ‘#’ on the lines containing the debian repositories. Now issue set_repo excito on the command line, to activate the excito repository


To change repository you need to become root and type set_repo debian. When executing this script it will remove the soft link and create a new one that points at /etc/sources.debian. It will also call apt-get to synchronize the package index with the new repository. If you for some reason don’t want it to synchronize, add a ‘-n’ before the repository (eg. set_repo -n debian).

To change it back, type set_repo excito. Should you forget this, the script restore_repo, started by cron, will restore it for you the next time it is run. Note however that you must be logged off, actually no one must be logged on, for the script to actually change anything. If any user is logged on, the file is left unchanged. This is to prevent it from changing the links while you’re logged on and possibly want them to point at another repository.

Comments are closed.