@@ -119,9 +119,11 @@ def _get_network_map(self):
119119 proot_netmap_list = []
120120 for (cont_port , host_port ) in list (self ._get_portsmap ().items ()):
121121 proot_netmap_list .extend (["-p" , "%d:%d" % (cont_port , host_port )])
122- if self .opt ["netcoop" ]:
122+ if self .opt ["netcoop" ] and self . _has_option ( "--netcoop" ) :
123123 proot_netmap_list .extend (["-n" , ])
124- return proot_netmap_list
124+ if proot_netmap_list and self ._has_option ("--port" ):
125+ return proot_netmap_list
126+ return []
125127
126128 def _get_qemu_string (self ):
127129 """Get the qemu string for container run command if emulation needed"""
@@ -162,6 +164,12 @@ def run(self, container_id):
162164 else :
163165 proot_verbose = []
164166
167+ if (Config .conf ['proot_link2symlink' ] and
168+ self ._has_option ("--link2symlink" )):
169+ proot_link2symlink = ["--link2symlink" , ]
170+ else :
171+ proot_link2symlink = []
172+
165173 if (Config .conf ['proot_killonexit' ] and
166174 self ._has_option ("--kill-on-exit" )):
167175 proot_kill_on_exit = ["--kill-on-exit" , ]
@@ -173,6 +181,7 @@ def run(self, container_id):
173181 cmd_l .append (self .executable )
174182 cmd_l .extend (proot_verbose )
175183 cmd_l .extend (proot_kill_on_exit )
184+ cmd_l .extend (proot_link2symlink )
176185 cmd_l .extend (self ._get_qemu_string ())
177186 cmd_l .extend (self ._get_volume_bindings ())
178187 cmd_l .extend (self ._set_uid_map ())
0 commit comments