X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lxcsu;h=742fc8307386fab3fb505fbb8588d76896c42aae;hb=e089948992a8feff3f15719708e21e40b514acf8;hp=2ac7920acd2cd85bad767a278b6e936633d21d90;hpb=5a3481ee8610f14bd8cf0fd241d068b6c65ee45b;p=lxc-userspace.git diff --git a/lxcsu b/lxcsu index 2ac7920..742fc83 100755 --- a/lxcsu +++ b/lxcsu @@ -4,6 +4,7 @@ import os import sys from argparse import ArgumentParser + LXCSU_INTERNAL='/usr/sbin/lxcsu-internal' def main (): @@ -14,8 +15,11 @@ def main (): options = parser.parse_args() slice_name=options.slice_name commands = options.command_to_run + if (not commands): + commands = ['/bin/sh'] + - exec_args = [LXCSU_INTERNAL,slice_name,'--'] + exec_args = [LXCSU_INTERNAL,slice_name,'--','-c'] exec_args+=commands os.execv(LXCSU_INTERNAL,exec_args)