bundles/users: source users bashrc after loading global bashrc instead of overwriting it
This commit is contained in:
parent
c02a1f2a90
commit
dcb9db3639
2 changed files with 13 additions and 5 deletions
|
@ -64,3 +64,8 @@ ${k}() {
|
|||
${v}
|
||||
}
|
||||
% endfor
|
||||
|
||||
if [[ -f "/etc/bashrc_bundlewrap/$(logname)" ]]
|
||||
then
|
||||
source "/etc/bashrc_bundlewrap/$(logname)"
|
||||
fi
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
from os.path import exists, join
|
||||
|
||||
directories['/etc/bashrc_bundlewrap'] = {
|
||||
'purge': True,
|
||||
}
|
||||
|
||||
files = {
|
||||
'/etc/bash.bashrc': {
|
||||
'source': 'bashrc',
|
||||
|
@ -64,14 +68,13 @@ for username, attrs in node.metadata['users'].items():
|
|||
}
|
||||
|
||||
if exists(join(repo.path, 'data', 'users', 'files', 'bash', '{}.bashrc'.format(username))):
|
||||
files[home + '/.bashrc'] = {
|
||||
files[f'/etc/bashrc_bundlewrap/{username}'] = {
|
||||
'content_type': 'mako',
|
||||
'source': 'bash/{}.bashrc'.format(username),
|
||||
}
|
||||
else:
|
||||
files[home + '/.bashrc'] = {
|
||||
'delete': True,
|
||||
}
|
||||
files[f"{home}/.bashrc"] = {
|
||||
'delete': True,
|
||||
}
|
||||
|
||||
if attrs.get('enable_linger', False):
|
||||
linger_test = ''
|
||||
|
|
Loading…
Reference in a new issue