mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-10 17:19:51 +00:00
Change default shell in /etc/default/useradd for Azure images.
This commit is contained in:
parent
8e06ef2294
commit
b5a0c7df21
1 changed files with 6 additions and 0 deletions
|
@ -47,3 +47,9 @@ class Waagent(Task):
|
|||
if os.path.isfile(info.manifest.provider['waagent']['conf']):
|
||||
log_check_call(['cp', info.manifest.provider['waagent']['conf'],
|
||||
os.path.join(info.root, 'etc/waagent.conf')])
|
||||
|
||||
# The Azure Linux agent uses 'useradd' to add users, but SHELL
|
||||
# is set to /bin/sh by default. Set this to /bin/bash instead.
|
||||
from bootstrapvz.common.tools import sed_i
|
||||
useradd_config = os.path.join(info.root, 'etc/default/useradd')
|
||||
sed_i(useradd_config, r'^(SHELL=.*)', r'SHELL=/bin/bash')
|
||||
|
|
Loading…
Add table
Reference in a new issue