qemush : ajout de jolis retours à la ligne
This commit is contained in:
parent
2fb08080bb
commit
42734333b0
1 changed files with 8 additions and 0 deletions
|
@ -46,6 +46,7 @@ EOF
|
|||
error_usage() {
|
||||
perror "invalid usage"
|
||||
>&2 public_help
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
|
@ -57,6 +58,7 @@ public_start() {
|
|||
-name "$QEMUSH_NAME" \
|
||||
-monitor "unix:$(pathof socket),server,nowait" \
|
||||
-daemonize
|
||||
|
||||
if ! "$@"; then
|
||||
perror "error launching virtual machine \"${QEMUSH_NAME}\""
|
||||
return 2
|
||||
|
@ -75,6 +77,7 @@ public_attach() {
|
|||
# List running virtual machines
|
||||
public_running() {
|
||||
cd || return
|
||||
|
||||
echo "Running machines:"
|
||||
exec ls -t sockets/monitors
|
||||
}
|
||||
|
@ -82,6 +85,7 @@ public_running() {
|
|||
# List available virtual machines entrypoints
|
||||
public_ls() {
|
||||
cd || return
|
||||
|
||||
echo "Available machines:"
|
||||
exec ls launchers
|
||||
}
|
||||
|
@ -97,6 +101,7 @@ public_diskadd() {
|
|||
public_diskrm() {
|
||||
for disk in "$@"; do
|
||||
export QEMUSH_NAME="$disk"
|
||||
|
||||
rm -vi -- "$(pathof disk)"
|
||||
done
|
||||
}
|
||||
|
@ -104,6 +109,7 @@ public_diskrm() {
|
|||
# List available disks
|
||||
public_diskls() {
|
||||
cd || return
|
||||
|
||||
echo "Available disks:"
|
||||
exec ls disks
|
||||
}
|
||||
|
@ -125,6 +131,7 @@ public_edit() {
|
|||
# Delete a virtual machine entrypoint
|
||||
public_rm() {
|
||||
cd ~/launchers || return
|
||||
|
||||
exec rm -vi -- "$@"
|
||||
}
|
||||
|
||||
|
@ -170,6 +177,7 @@ public_do() {
|
|||
# Expose SPICE via TCP
|
||||
public_spice() {
|
||||
export QEMUSH_NAME="$1"
|
||||
|
||||
if [ -n "$2" ]; then
|
||||
port=$2
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue