Skip to content

Commit b3a334c

Browse files
author
olevole
committed
show attach string
1 parent 6e98c4c commit b3a334c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/save-jail-info

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ create_env()
6262
is_power_on="true"
6363
fi
6464

65+
attach_cmd=
66+
6567
# extras area
6668
v6_addr=
6769
v4_addr="${ssh_host}"
@@ -73,6 +75,7 @@ create_env()
7375
case "${emulator}" in
7476
jail)
7577
type="container"
78+
attach_cmd="/usr/local/bin/sudo /usr/local/bin/cbsd jlogin jname=${jname}"
7679
;;
7780
*)
7881
type="vm"
@@ -219,6 +222,11 @@ create_env()
219222
"image": "${image}",
220223
EOF
221224

225+
if [ -n "${attach_cmd}" ]; then
226+
${CAT_CMD} >> ${json_tmp} <<EOF
227+
"attach_cmd": "${attach_cmd}",
228+
EOF
229+
fi
222230
if [ -n "${ssh_user}" ]; then
223231
${CAT_CMD} >> ${json_tmp} <<EOF
224232
"ssh_user": "${ssh_user}",
@@ -352,6 +360,7 @@ imgsize_bytes="${imgsize_bytes}"
352360
imgsize="${imgsize}"
353361
vm_os_type="${vm_os_type}"
354362
vm_os_profile="${vm_os_profile}"
363+
attach_cmd="${attach_cmd}"
355364
ssh_user="${ssh_user}"
356365
ssh_host="${ssh_host}"
357366
ssh4_host="${ssh4_host}"

0 commit comments

Comments
 (0)