post_install_sid: Exit if no informations file is available.

This commit is contained in:
gardouille 2015-11-03 18:55:42 +01:00
parent 246c7694a1
commit fd62cc8229
2 changed files with 9 additions and 1 deletions

View File

@ -7,6 +7,7 @@
* Forward root's mails to new user email address.
* Ensure to disable dangerous modules (firewire, thunderbolt, …).
* Add the possibility to set the GRUB_TIMEOUT
* Exit if no informations file is available.
### 0.3.0

View File

@ -175,7 +175,14 @@ OPTIONS=""
grub_timeout='5'
# Load additionnal informations (new_username, new_user_mail, …) and override some variables
. ${script_path}/informations
if [ -f ${script_path}/informations ]; then
. ${script_path}/informations
else
printf '%b' "You should define a ${script_path}/informations file\n"
printf '%b' "Or simply copy the template:\n"
printf '%b' "cp ${script_path}/Informations.template ${script_path}/informations\n"
exit 1
fi
# Fin des variables globales
# -----------------------------------------------------------