def command_run():
(daemon_type, daemon_id) = args.name.split('.')
- (uid, gid) = extract_uid_gid()
c = get_container(args.fsid, daemon_type, daemon_id)
subprocess.call(c.run_cmd())
-
##################################
def command_shell():
else:
daemon_type = args.name
daemon_id = None
- (uid, gid) = extract_uid_gid()
c = get_container(args.fsid, daemon_type, daemon_id)
subprocess.call(c.shell_cmd())
def command_enter():
(daemon_type, daemon_id) = args.name.split('.')
- (uid, gid) = extract_uid_gid()
c = get_container(args.fsid, daemon_type, daemon_id)
subprocess.call(c.exec_cmd(['bash']))
def command_exec():
(daemon_type, daemon_id) = args.name.split('.')
- (uid, gid) = extract_uid_gid()
c = get_container(args.fsid, daemon_type, daemon_id,
privileged=args.privileged)
subprocess.call(c.exec_cmd(args.command))