Files
iconograph/server/modules/persistent.py
2016-03-31 16:25:41 -07:00

34 lines
598 B
Python
Executable File

#!/usr/bin/python3
import argparse
import os
parser = argparse.ArgumentParser(description='iconograph persistent')
parser.add_argument(
'--chroot-path',
dest='chroot_path',
action='store',
required=True)
FLAGS = parser.parse_args()
def main():
os.mkdir(os.path.join(FLAGS.chroot_path, 'persistent'))
init = os.path.join(FLAGS.chroot_path, 'etc', 'init', 'persistent.conf')
with open(init, 'w') as fh:
fh.write("""
description "Mount /persistent"
start on filesystem
script
mount LABEL=PERSISTENT /persistent
end script
""")
if __name__ == '__main__':
main()