post_install_sid: Use the script_path var instead of INSTALL_DIR (=pwd).

This commit is contained in:
gardouille 2015-11-03 19:05:32 +01:00
parent e831e9664c
commit a30318b69c
2 changed files with 5 additions and 7 deletions

View File

@ -9,6 +9,7 @@
* Add the possibility to set the GRUB_TIMEOUT
* Exit if no informations file is available.
* Add a ".pref" extension to the preferences files.
* Use the script_path var instead of INSTALL_DIR (=`pwd`).
### 0.3.0

View File

@ -165,9 +165,6 @@ mode_debug=5
## Architecture de la distribution
ARCH=""
## Emplacement du script
INSTALL_DIR=$(pwd)
## Options d'aptitude en fonction du niveau de debug
OPTIONS=""
@ -506,8 +503,8 @@ architecture()
# Prototype: preconfig "NOM_PAQUET"
preconfig()
{
if [ -f ${INSTALL_DIR}/seed/${1}.seed ]; then
debconf-set-selections ${INSTALL_DIR}/seed/${1}.seed
if [ -f ${script_path}/seed/${1}.seed ]; then
debconf-set-selections ${script_path}/seed/${1}.seed
check_output "Préconfiguration de ${1}"
else
echow "Il n'existe aucun fichier seed pour ${1}."
@ -561,14 +558,14 @@ test -f /etc/apt/sources.list && mv /etc/apt/sources.list /etc/apt/sources.list.
rm -f /etc/apt/sources.list\~
### Copy all local sources.list files
cp -f ./apt/sources-list.d/* /etc/apt/sources.list.d/
cp -f ${script_path}/apt/sources-list.d/* /etc/apt/sources.list.d/
## Preferences
### Backup initial
test -f /etc/apt/preferences && mv /etc/apt/preferences /etc/apt/preferences.bkp
### Copy all local preferences files
cp -f ./apt/preferences.d/* /etc/apt/preferences.d/
cp -f ${script_path}/apt/preferences.d/* /etc/apt/preferences.d/
aptitude update
check_output "Update Debian repositories"