Only change login umask when needed

This commit is contained in:
Bob Mottram 2017-08-05 23:16:37 +01:00
parent f7f323b763
commit c8de324376
1 changed files with 3 additions and 1 deletions

View File

@ -437,7 +437,9 @@ function remove_management_engine_interface {
}
function set_login_umask {
sed -i 's|UMASK\t.*|UMASK\t\t077|g' /etc/login.defs
if ! grep -q 'UMASK\t\t077' /etc/login.defs; then
sed -i 's|UMASK\t.*|UMASK\t\t077|g' /etc/login.defs
fi
}
function disable_deferred_execution {