/usr/share/pyshared/fts/main.py is in fts 1.1-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Usage:
Call "fts" as root to mount the layer filesystem.
Call "fusermount -u PATH" as root to unmount the layer filesystem.
"""
import os
import syslog
import fuse
import sys
from fts.pxefs import PXEfs
def main():
# Fuse sanity check
if not hasattr(fuse, '__version__'):
raise RuntimeError, \
"Your fuse python module doesn't know it's version, probably it's too old."
# Setup
fuse.fuse_python_api = (0, 2)
fuse.feature_assert('stateful_files', 'has_init')
syslog.openlog('fts', syslog.LOG_PID, syslog.LOG_USER)
usage = """
TFTP supplicant: provide pxelinux configuration files based on external state
information.
""" + fuse.Fuse.fusage
fs = PXEfs(version="%prog " + fuse.__version__, usage=usage,
dash_s_do='setsingle')
# Disable multithreading and set up the fs parser
fs.multithreaded = False
fs.parser.add_option(mountopt="root",
metavar="PATH",
default=os.sep,
help="mirror filesystem from PATH [default: %default]")
fs.parse(values=fs, errex=1)
try:
if fs.fuse_args.mount_expected():
os.chdir(fs.root)
except OSError:
syslog.syslog(syslog.LOG_ERR, "can't enter static filesystem")
sys.exit(1)
syslog.syslog(syslog.LOG_INFO, "fts is now mounted on %s" % fs.cfg_path)
fs.main()
if __name__ == '__main__':
main()
|