rfs: make sure /tmp is writable at the configuring stage

deb packages may wrongly make it unwritable

Signed-off-by: Wataru Ishida <ishida@nel-america.com>
This commit is contained in:
Wataru Ishida
2018-07-13 15:11:05 -07:00
parent 16dc613601
commit 3955bf2528

View File

@@ -392,6 +392,8 @@ class OnlRfsBuilder(object):
onlu.execute('sudo cp %s %s' % (os.path.join(os.getenv('ONL'), 'tools', 'scripts', 'base-files.postinst'),
os.path.join(dir_, 'var', 'lib', 'dpkg', 'info', 'base-files.postinst')));
# make sure /tmp is writable
OnlRfsSystemAdmin.chmod('1777', '%s/tmp' % dir_)
script = os.path.join(dir_, "tmp/configure.sh")
with open(script, "w") as f:
os.chmod(script, 0700)