Check for the existance of /etc/inittab before attempting to modify it.

This commit is contained in:
Jeffrey Townsend
2019-06-13 16:23:36 +00:00
parent 3f4bb55187
commit 748f23269b

View File

@@ -517,6 +517,7 @@ rm -f /usr/sbin/policy-rc.d
onlu.execute('sudo rm %s' % f,
ex=OnlRfsError('Could not remove file %s' % f))
if os.path.exists(os.path.join(dir_, 'etc/inittab')):
if not options.get('ttys', False):
f = os.path.join(dir_, 'etc/inittab')
ua.chmod('a+w', f)