forked from pool/cloud-init
Dirk Mueller
ed9aa9f0d8
* skip checking for files in /etc/sysconfig that never exist on a wickedd based system OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=108
19 lines
831 B
Diff
19 lines
831 B
Diff
Index: cloud-init-17.2/cloudinit/distros/__init__.py
|
|
===================================================================
|
|
--- cloud-init-17.2.orig/cloudinit/distros/__init__.py
|
|
+++ cloud-init-17.2/cloudinit/distros/__init__.py
|
|
@@ -551,8 +551,11 @@ class Distro(object):
|
|
# about long names.
|
|
util.subp(['passwd', '-l', name])
|
|
except Exception as e:
|
|
- util.logexc(LOG, 'Failed to disable password for user %s', name)
|
|
- raise e
|
|
+ if e.exit_code != 3:
|
|
+ util.logexc(LOG, 'Failed to disable password for user %s', name)
|
|
+ raise e
|
|
+ else:
|
|
+ util.logexc(LOG, 'Password access already locked for user %s', name)
|
|
|
|
def set_passwd(self, user, passwd, hashed=False):
|
|
pass_string = '%s:%s' % (user, passwd)
|