diff --git a/lib/vm-core b/lib/vm-core index 34b9b3c3..19bc9b02 100644 --- a/lib/vm-core +++ b/lib/vm-core @@ -370,7 +370,7 @@ core::stopall(){ core::start(){ local _name="$1" local _iso="$2" - local _cpu _memory _disk _guest _loader _console _tmux_cmd + local _cpu _memory _disk _guest _loader _console _tmux_cmd _tmux_name [ -z "${_name}" ] && util::usage @@ -416,7 +416,11 @@ core::start(){ if [ -n "${VM_FOREGROUND}" ]; then $0 -f _run "${_name}" "${_iso}" elif [ "${_console}" = "tmux" ]; then - ${_tmux_cmd} new -ds "${_name}" $0 -f _run "${_name}" "${_iso}" + # can't have dots in tmux session :( (looks like it may use . to separate window.pane) + # use ~ which we don't normally allow + _tmux_name=$(echo "${_name}" | tr "." "~") + + ${_tmux_cmd} new -ds "${_tmux_name}" $0 -f _run "${_name}" "${_iso}" else $0 _run "${_name}" "${_iso}" >/dev/null 2>&1 & fi @@ -555,7 +559,7 @@ core::rename(){ core::console(){ local _name="$1" local _port="$2" - local _console _tmux _tmux_cmd + local _console _tmux _tmux_cmd _tmux_name [ -z "${_name}" ] && util::usage @@ -581,7 +585,9 @@ core::console(){ _tmux=$("${_tmux_cmd}" ls |grep "^${_name}:") if [ -n "${_tmux}" ]; then - ${_tmux_cmd} attach -t ${_name} + _tmux_name=$(echo "${_name}" | tr "." "~") + + ${_tmux_cmd} attach -t ${_tmux_name} exit fi fi diff --git a/vm b/vm index b9eb5727..88293f66 100644 --- a/vm +++ b/vm @@ -24,8 +24,8 @@ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -VERSION=1.1-p4 -VERSION_INT=101065 +VERSION=1.1-p5 +VERSION_INT=101066 VERSION_BSD=$(uname -K) PATH=${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin