Adding support for apt preference.d in config/chroot_apt.

This commit is contained in:
Daniel Baumann 2012-01-07 19:47:41 +01:00
parent 4581e49d4e
commit ac004b56d2
1 changed files with 31 additions and 0 deletions

View File

@ -108,6 +108,19 @@ case "${1}" in
cp config/chroot_apt/preferences chroot/etc/apt/preferences
fi
if Find_files config/chroot_apt/*.pref
then
for _FILE in config/chroot_apt/*.pref
do
if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}) ]
then
mv chroot/etc/apt/preferences.d/$(basename ${_FILE}) chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig
fi
cp ${_FILE} chroot/etc/apt/preferences.d
done
fi
if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb
then
echo >> chroot/etc/apt/preferences
@ -236,6 +249,24 @@ EOF
fi
fi
if Find_files config/chroot_apt/*.pref
then
for _FILE in config/chroot_apt/*.pref
do
if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}) ]
then
mv chroot/etc/apt/preferences.d/$(basename ${_FILE}) chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig
fi
cp ${_FILE} chroot/etc/apt/preferences.d
if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}) ]
then
mv chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig chroot/etc/apt/preferences.d/$(basename ${_FILE})
fi
done
fi
if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb
then
if [ -f chroot/etc/apt/preferences ]