diff options
author | Jamie McClelland <jm@mayfirst.org> | 2009-10-08 21:00:25 -0400 |
---|---|---|
committer | Jamie McClelland <jm@mayfirst.org> | 2009-10-08 21:00:25 -0400 |
commit | bd51acb7c87e37a1831d1269c3b877229a773698 (patch) | |
tree | cc905e9e9ced9ca475e179033e539051562c6947 | |
parent | a18b3bc83c262525ab21013744fa1dbd515a1813 (diff) | |
download | kvm-manager-bd51acb7c87e37a1831d1269c3b877229a773698.tar.gz kvm-manager-bd51acb7c87e37a1831d1269c3b877229a773698.tar.bz2 |
ensure /etc/sv/kvm exists.
-rwxr-xr-x | kvm-creator | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kvm-creator b/kvm-creator index 79f88ca..cd4f6f6 100755 --- a/kvm-creator +++ b/kvm-creator @@ -13,6 +13,8 @@ VG="$2" SIZE="${3:-3G}" RAM="${4:-512}" +[ ! -d /etc/sv/kvm ] && mkdir /etc/sv/kvm + if [ ls /etc/sv/kvm/* &> /dev/null ]; then TAP="${5:-$(( $( cat /etc/sv/kvm/*/env/TAP | sed 's/^tap//' | sort -n | tail -n 1 ) + 1 ))}" MAC="${6:-$(cat /etc/sv/kvm/*/env/MAC | head -n1 | cut -f 1-5 -d: ):$(( $( cat /etc/sv/kvm/*/env/MAC | cut -f 6 -d: | sort -n | tail -n 1 ) + 1 ))}" |