diff options
author | Jamie McClelland <jm@mayfirst.org> | 2009-10-08 21:52:36 -0400 |
---|---|---|
committer | Jamie McClelland <jm@mayfirst.org> | 2009-10-08 21:52:36 -0400 |
commit | 0e01a06f857aab92a44f7f9c334ef100a0508a15 (patch) | |
tree | 910c7fb9522ad1ddeb7b59b7844f8f73a0c1d4a8 /kvm-creator | |
parent | 0de61dbe1de6e173481729e53e32083c9e28b7e5 (diff) | |
download | kvm-manager-0e01a06f857aab92a44f7f9c334ef100a0508a15.tar.gz kvm-manager-0e01a06f857aab92a44f7f9c334ef100a0508a15.tar.bz2 |
fix test for /etc/sv/kvm/*
Diffstat (limited to 'kvm-creator')
-rwxr-xr-x | kvm-creator | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kvm-creator b/kvm-creator index 6a1300a..59eb7eb 100755 --- a/kvm-creator +++ b/kvm-creator @@ -15,7 +15,8 @@ RAM="${4:-512}" [ ! -d /etc/sv/kvm ] && mkdir /etc/sv/kvm -if [ ls /etc/sv/kvm/* &> /dev/null ]; then +ls /etc/sv/kvm/* &> /dev/null +if [ "$?" -eq 0 ]; then TAP="${5:-tap$(( $( 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 ))}" else |