# HG changeset patch # User Heiko Schlittermann # Date 1251295442 -7200 # Node ID 48ec3ee16cd8e429b4b1a61eff12ae081daa281a # Parent f48202d2c4a0900cf846bb009f26f3d3abf71f4f reorded diff -r f48202d2c4a0 -r 48ec3ee16cd8 kvmtool --- a/kvmtool Tue Aug 25 23:28:40 2009 +0200 +++ b/kvmtool Wed Aug 26 16:04:02 2009 +0200 @@ -63,19 +63,6 @@ } -sub cmd_kill(@) { - my ($kvm) = @_; - pod2usage() if not defined $kvm; - my $config = config->load_running_config(_running_config_file $kvm); - my $pidfile = $config->get("-pidfile"); - my $pid = slurp $pidfile, { chomp => 1 }; - - kill $KILL => $pid; - waitpid($pid, 0); - unlink $pidfile, _monitor_link $kvm, _running_config_file $kvm; - -} - sub cmd_start(@) { my ($kvm) = @_; pod2usage() if not defined $kvm; @@ -183,6 +170,20 @@ system("stty $termio"); } +sub cmd_kill(@) { + my ($kvm) = @_; + pod2usage() if not defined $kvm; + my $config = config->load_running_config(_running_config_file $kvm); + my $pidfile = $config->get("-pidfile"); + my $pid = slurp $pidfile, { chomp => 1 }; + + kill $KILL => $pid; + waitpid($pid, 0); + unlink $pidfile, _monitor_link $kvm, _running_config_file $kvm; + +} + + { package config; @@ -287,14 +288,14 @@ Use the specified configuration instead of the one once imported. (default: I) +=item B<--dev>=I + +Pathname of the KVM device. (default: F) + =item B<-i>|B<--import> Import the specified configuration. (default: I) -=item B<--dev>=I - -Pathname of the KVM device. (default: /dev/kvm) - =item B<-h>|B<--help> Show a short help page.