post_install_sid: Add the possibility to set the GRUB_TIMEOUT

This commit is contained in:
gardouille 2015-11-03 18:52:42 +01:00
parent 50957f66eb
commit 246c7694a1
4 changed files with 16 additions and 4 deletions

View File

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

View File

@ -50,6 +50,8 @@ iface enp0s25 inet dhcp
* Modprobe
* Disable the annoying console beeps
* Ensure to disable dangerous modules such as firewire, thunderbolt, …
* Grub
* Add the possibility to set the GRUB_TIMEOUT
#### Network share

View File

@ -6,3 +6,4 @@ new_user_mail='towel@101010.fr'
## System informations
debian_version_name='sid'
grub_timeout='3'

View File

@ -162,9 +162,6 @@ script_path=$(dirname $0)
# Mode debug
mode_debug=5
# Load additionnal informations (new_username, new_user_mail, …)
. ${script_path}/informations
## Architecture de la distribution
ARCH=""
@ -174,6 +171,12 @@ INSTALL_DIR=$(pwd)
## Options d'aptitude en fonction du niveau de debug
OPTIONS=""
# Default grub timeout
grub_timeout='5'
# Load additionnal informations (new_username, new_user_mail, …) and override some variables
. ${script_path}/informations
# Fin des variables globales
# -----------------------------------------------------------
# **********************************************************************************************
@ -1016,6 +1019,12 @@ cp ${script_path}/modprobe.d/blacklist-beep.conf /etc/modprobe.d/
# Ensure to blacklist dangerous modules (firewire, thunderbolt, …)
cp ${script_path}/modprobe.d/blacklist-dma.conf /etc/modprobe.d/
#### Grub
# Modify the default grub timeout
if [ ! "$(grep "GRUB_TIMEOUT=${grub_timeout}" /etc/default/grub)" ]; then
sed -i "s/^GRUB_TIMEOUT.*/GRUB_TIMEOUT=${grub_timeout}" /etc/default/grub
update-grub
fi
###### Information pour l'utilisateur final
cat >> "${INFORMATION}" << EOF