Compare commits

..

No commits in common. "2cdd2427a22c4001df82dbe5b53232ac50eb53ba" and "ff2a758af66b4ccc8c4091385012dd5f5269f312" have entirely different histories.

View file

@ -35,7 +35,7 @@ perror() {
public_help() { public_help() {
local name local name
name="$(basename "$0")" name="$(basename "$0")"
exec cat << EOF cat << EOF
${name}: usage: ${name}: usage:
${name} active - (default behaviour) list active VMs ${name} active - (default behaviour) list active VMs
${name} start <VM name> - start a VM ${name} start <VM name> - start a VM
@ -61,20 +61,20 @@ public_start() {
local vm_name="$1" local vm_name="$1"
shift shift
exec screen -S "$vm_name" "$vm_name" "$@" screen -S "$vm_name" "$vm_name" "$@"
} }
public_watch() { public_watch() {
exec screen -dr "$1" screen -dr "$1"
} }
public_active() { public_active() {
exec screen -ls screen -ls
} }
public_ls() { public_ls() {
echo "Available machines:" echo "Available machines:"
exec ls "$bin" ls "$bin"
} }
diskpath() { diskpath() {
@ -82,34 +82,32 @@ diskpath() {
} }
public_diskadd() { public_diskadd() {
exec qemu-img create -f qcow2 "$(diskpath "$1")" "$2" qemu-img create -f qcow2 "$(diskpath "$1")" "$2"
} }
public_diskrm() { public_diskrm() {
exec rm -vi -- "$(diskpath "$1")" rm -vi -- "$(diskpath "$1")"
} }
public_diskls() { public_diskls() {
echo "Available disks:" echo "Available disks:"
exec ls "$images" ls "$images"
} }
public_edit() { public_edit() {
local file="${bin}/${1}" "$EDITOR" "${bin}/${1}"
"$EDITOR" "$file"
exec chmod 740 "$file"
} }
public_rm() { public_rm() {
exec rm -vi -- "${bin}/${1}" rm -vi -- "${bin}/${1}"
} }
public_shell() { public_shell() {
exec bash -i bash -i
} }
public_cat() { public_cat() {
exec "$cat" "${bin}/${1}" "$cat" "${bin}/${1}"
} }
function="$1" function="$1"