Moblin and Maemo to merge
Moblin and Maemo to merge
Posted Feb 16, 2010 16:15 UTC (Tue) by foom (subscriber, #14868)In reply to: Moblin and Maemo to merge by zlynx
Parent article: Moblin and Maemo to merge
massive changes in stable updates, so there's little that could go wrong. I wouldn't recommend
using this for upgrading from one distro version to another, though -- skipping all questions
and using only old config files is quite likely to get you into trouble.
Anyhow, the following shell fragment is what I use.
DEBIAN_PRIORITY says only ask critical questions. DEBIAN_FRONTEND makes it not ask the user
any debconf prompts, ever, no matter what (that is: even critical ones won't get asked).
All the -o Dir::Etc lines are to make it use a different sources.list file for the auto-updates (in
which I only put the stable and security repos; the normal sources list might contain random
other things I don't want to pull auto updates for). --no-list-cleanup makes it not remove the
files for the other sources that might be in the user's normal sources.list. You can get rid of
those lines if you just want to autoinstall from whatever is in your normal sources.list.
Dpkg::Options::="--force-confold" makes it not prompt what to do about modified
configuration files: it just keeps the version you already have.
-y answers yes to all apt-get questions.
-q omits progress bars.
auto_apt_get () {
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical \
apt-get \
-o Dir::Etc::Preferences="$PWD/daily-auto-update-preferences" \
-o Dir::Etc::PreferencesParts="$PWD/daily-auto-update-preferences.d" \
-o Dir::Etc::SourceList="$PWD/daily-auto-update-sources.list" \
-o Dir::Etc::SourceParts="$PWD/daily-auto-update-sources.list.d" \
--no-list-cleanup \
-o Dpkg::Options::="--force-confold" \
-y -q "$@"
}
auto_apt_get update
auto_apt_get upgrade
