post_install_sid.sh: correct root's forwarding.

This commit is contained in:
gardouille 2015-11-11 14:24:34 +01:00
parent 9126e6c6e4
commit 95cb9e5b0e
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
### 0.3.1
#### Changes
* Forward root's mails to new user email address.
* Add a forwarding of 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.

View File

@ -1295,8 +1295,8 @@ aptins "Internet tools for shell" axel finch postfix weechat-curses
###### Post-configuration
#### Postfix
# Ensure to forward root's mails to $new_user_mail
if [ ! "$(grep "root: ${new_user_mail}" /etc/aliases)" ]; then
sed "s/^root:.*/root: ${new_user_mail}/" /etc/aliases
if [ ! "$(grep "root: .*${new_user_mail}" /etc/aliases)" ]; then
sed -i "s/^root: /root: ${new_user_mail} /" /etc/aliases
newaliases
fi